Page 1 of 1

Using formulas withing DBRW

Posted: Mon Aug 08, 2011 10:15 pm
by telula_w
I have a calendar cube that has the Day, Month,Year and measures dimension.

Cell P$9 ="F"&DBRW("tm1prd:Calendar",D$7,D$8,D$9, "Forecast Week")
where
D$7=DAY(NOW())
D$8=MONTH(NOW())
D$9=YEAR(NOW())

This works fine.Its gives me F1,F2 etc
However, when I use the cell in a DBRW formula, like below, it gives me a #VALUE error.
=DBRW(Cube1,Currency,P$9,P$8,Month_Period,Region,Company,$D14,Cost_Center,$C14,Order_Status,Category,Short_Code,Mercury_Code,Measure)

If I remove the ="F"&DBRW("tm1prd:Calendar",D$7,D$8,D$9, "Forecast Week") formula and type in F1 or F2, it works.
Is there a workaround?

Re: Using formulas withing DBRW

Posted: Mon Aug 08, 2011 10:32 pm
by Martin Ryan
DBRWs are all executed simultaneously. That means when the second one that relies on P9 is being run, P9 is currently blank. As a result the second one doesn't know where to look.

Change your second formula from DBRW to DBR and it will wait for the preceding calculation to be done before it calculates itself.

Martin

Re: Using formulas withing DBRW

Posted: Mon Aug 08, 2011 10:42 pm
by telula_w
Thanks that worked!