Page 1 of 1
Creating a calculation in TI from a cube view
Posted: Wed Mar 21, 2012 7:53 pm
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?
Re: Creating a calculation in TI from a cube view
Posted: Wed Mar 21, 2012 8:15 pm
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;
Re: Creating a calculation in TI from a cube view
Posted: Wed Mar 21, 2012 8:29 pm
by ChrisF79
Worked great! Thanks