Using formulas withing DBRW

Post Reply
telula_w
Posts: 15
Joined: Wed Jan 05, 2011 11:28 pm
OLAP Product: TM1
Version: 9.1
Excel Version: 2003

Using formulas withing DBRW

Post 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?
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Using formulas withing DBRW

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
telula_w
Posts: 15
Joined: Wed Jan 05, 2011 11:28 pm
OLAP Product: TM1
Version: 9.1
Excel Version: 2003

Re: Using formulas withing DBRW

Post by telula_w »

Thanks that worked!
Post Reply