Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8511

Re: How to write script logic for performing calculations based on values of different members within a same dimension to update another member in the same dimension?

$
0
0

Hi Vadim

 

You nailed it. I wrote the following code and it worked!

 

*WHEN KEYFIGURE

  *IS PRICE2

  *REC(EXPRESSION = (([KEYFIGURE].[PRICE2],[UNIT].[USD])>0.5) ? ([KEYFIGURE].[PRICE2],[UNIT].[USD])*([KEYFIGURE].[CUSTOMER_FORECAST],[UNIT].[EA]) : ([KEYFIGURE].[PRICE1],[UNIT].[USD])*([KEYFIGURE].[CUSTOMER_FORECAST],[UNIT].[EA]), KEYFIGURE=CUSTOMER_REVENUE,UNIT=USD)

*ENDWHEN

 

Now the issue that I have is I will be having different currencies and units for different combinations and I cannot hardcode it that way. I tried using %UNIT_SET% but it did not work. Is there a way to generalize that? The Customer Revenue will have the same currency as Price1 and Price2. If this can be sorted out, I think it will be all set.


Viewing all articles
Browse latest Browse all 8511

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>