Creating a calculation in TI from a cube view

Post Reply
ChrisF79
Posts: 52
Joined: Mon Sep 20, 2010 2:20 pm
OLAP Product: IBM TM1
Version: 9.5.1
Excel Version: 2007 SP2

Creating a calculation in TI from a cube view

Post by ChrisF79 »

Sorry for the remedial nature of the question but it's been a while since I've done this. I'm building a cube with a different cube's view as the source. My measures I'm exporting are Qty and Price. In the new cube, I'm going to load commission rate which is simply price * 0.05. How do I write that formula? Do I need some sort of IF statement to see if the row I'm on contains Price?
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Creating a calculation in TI from a cube view

Post by Alan Kirk »

ChrisF79 wrote:Sorry for the remedial nature of the question but it's been a while since I've done this. I'm building a cube with a different cube's view as the source. My measures I'm exporting are Qty and Price. In the new cube, I'm going to load commission rate which is simply price * 0.05. How do I write that formula? Do I need some sort of IF statement to see if the row I'm on contains Price?
Assuming that the value variable is named Value, you could simply do something like

Code: Select all

CellPutN(Value * 0.05,Cube,Dim1,Dim2, {etc});
Yes, put that statement inside an If block. Assuming that the relevant variable / field name is Measure

Code: Select all

If ( Measure @='Price');
    CellPutN as above
EndIf;
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
ChrisF79
Posts: 52
Joined: Mon Sep 20, 2010 2:20 pm
OLAP Product: IBM TM1
Version: 9.5.1
Excel Version: 2007 SP2

Re: Creating a calculation in TI from a cube view

Post by ChrisF79 »

Worked great! Thanks
Post Reply