Skip to Content
0

In logic script, how to recognize a blank as a zero?

Jun 30, 2017 at 09:34 PM

37

avatar image

We run a script that takes our price change for one year and does calculations to save a data point for the out years. For example 2018 there is a price change of 1%. In 2019 we don't want any incremental price change so we save nothing. In 2020 there is another 2% price increase. For our dollarization to work, we need a price change to be saved in 2019. Our current logic is below. It works when every year has a percent increase but not when one is blank.

*WHEN ACCOUNT
*IS PRICE_CHG2
*REC(EXPRESSION=(1+([TIME].[TMVL(-1,%PP%)]))*(1+[ACCOUNT].[PRICE_CHG])-1)
*REC(EXPRESSION=(1+([TIME].[TMVL(-1,%PP%)]))*(1+[ACCOUNT].[PRICE_CHG])-1,TIME=TMVL(1,%PP%))

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers