Page 1 of 1

DBRA formula returning KEY_ERR

Posted: Mon Nov 21, 2011 11:53 am
by tosca1978
Hi,

I ma building an input template ine ecel 2007 and TM1 9.5.2 with DBRW's.
Hello mate,

When I recalculate the values turn to "KEY_ERR". If I enter the cell (press F2) and press "enter" the value comes back - but I have to do this cell by cell.

I assume that the DBRW formula must be working as it is pulling through the correct values. So I assume it is a recalc issue. I have tried pressing F9, Shift+F9 Alt+F9 etc with no luck. I have also tried "TM1Refresh" and "TM1Recalc" with the range in the VBA. This actually removed the DBRW formula altogther and replaces it with a value of 1!!!!!!!!

Any advice would be most welcome.

Cheers

Re: DBRA formula returning KEY_ERR

Posted: Mon Nov 21, 2011 12:08 pm
by lotsaram
From the description more than likely that you have a string value pulled by a DBRW that acts as a dimension reference input for the "downstream" DBRW formula.

Replace the formula retrieving the string with a DBR instead of DBRW.

Re: DBRA formula returning KEY_ERR

Posted: Mon Nov 21, 2011 12:10 pm
by Steve Rowe
This is probably a calc order issue.

DBRWs returns its results in a batch of results rather than one cell at a time. If you have another TM1 formula that uses a DBRW as a reference they often go wrong since the DBRW has not been correctly resolved when the DBRA is evaluated.

To correct your problem replace DBRW with DBR which calculates one cell at a time. Note though that it will be slower to calc.

Cheers

Re: DBRA formula returning KEY_ERR

Posted: Mon Nov 21, 2011 12:13 pm
by tosca1978
Steve/Lotsaram,

I have replaced with DRW and now F9 works fine.

many thanks to you both for your help.

Re: DBRA formula returning KEY_ERR

Posted: Mon Nov 21, 2011 10:39 pm
by Gregor Koch
Hi
Can I just suggest to try and do these kind of look ups on the server side so you don't have to use DBRs. It's not a problem if you use a few (DBRs) in a report but if you need this, say, down the rows for a few hundred than the performance of the report most likely will suffer quite a bit.
Also consider SHIFT-F9 rather than F9.

Re: DBRA formula returning KEY_ERR

Posted: Wed Dec 07, 2011 7:00 pm
by DeeDee
Hi Gregor,

"Can I just suggest to try and do these kind of look ups on the server side so you don't have to use DBRs. ", can you elaborate how to do this? Thanks!