Compare string with a less than sign "@<="
Posted: Tue Nov 08, 2011 11:11 am
Hi,
I have built a Forecast cube which holds budget and actual costs by month. The Measures dim has Budget, Actual, Variance and Forecast. The variance calculates the variance between budget and actual costs. I do not want the variance calculation to be part of the hierarchy because I only want a variance to be displayed for either the Current month or historic months (if part of the hierarchy it will always display a variance in forcast months.
(This is because I have a rule that takes the sum of the variance (current month and historic) and spreads it back over the remaining forecast months so that forecast costs of the "Project" will always come back to teh same value of the original budget. )
I have written the following rule:
# The following code puts the delta (Original Budget - VOWD) into the dummy Vendor and PO for Original Budget:['OB_VOWD','Original Budget Vendor','Original Budget PO']=N:
IF(!Tullow_Measures@=DB('Current Month','aNumber','aString'),
(['Original Budget','Original Budget Vendor','Original Budget PO']-['Value of Work Done','TOTAL VENDORS','TOTAL PO']),Continue);
I have a "Current Month" cube in which I can input the current month. At the moment this cube says "Oct-11". My Forecast cube correctly calculates the variance between Actual and Budget for Oct-11 which I am happy with. However, To get the variance calculation to function for the current month AND all historic months I changed the "@=" to "@<=". This does not have the required effect! It performs the variance calculation in multiple random months (both historic and future).
I wondered if this was because the dim comparison was comparing an index number of the element rather than "Oct-11". However that doesn't seem to make sense either.
As always, any ideas would be much appreciated.
Many thanks
I have built a Forecast cube which holds budget and actual costs by month. The Measures dim has Budget, Actual, Variance and Forecast. The variance calculates the variance between budget and actual costs. I do not want the variance calculation to be part of the hierarchy because I only want a variance to be displayed for either the Current month or historic months (if part of the hierarchy it will always display a variance in forcast months.
(This is because I have a rule that takes the sum of the variance (current month and historic) and spreads it back over the remaining forecast months so that forecast costs of the "Project" will always come back to teh same value of the original budget. )
I have written the following rule:
# The following code puts the delta (Original Budget - VOWD) into the dummy Vendor and PO for Original Budget:['OB_VOWD','Original Budget Vendor','Original Budget PO']=N:
IF(!Tullow_Measures@=DB('Current Month','aNumber','aString'),
(['Original Budget','Original Budget Vendor','Original Budget PO']-['Value of Work Done','TOTAL VENDORS','TOTAL PO']),Continue);
I have a "Current Month" cube in which I can input the current month. At the moment this cube says "Oct-11". My Forecast cube correctly calculates the variance between Actual and Budget for Oct-11 which I am happy with. However, To get the variance calculation to function for the current month AND all historic months I changed the "@=" to "@<=". This does not have the required effect! It performs the variance calculation in multiple random months (both historic and future).
I wondered if this was because the dim comparison was comparing an index number of the element rather than "Oct-11". However that doesn't seem to make sense either.
As always, any ideas would be much appreciated.
Many thanks