DBRA formula returning KEY_ERR

Post Reply
tosca1978
Posts: 101
Joined: Thu Oct 20, 2011 6:53 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007
Location: London, UK

DBRA formula returning KEY_ERR

Post 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
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: DBRA formula returning KEY_ERR

Post 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.
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: DBRA formula returning KEY_ERR

Post 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
Technical Director
www.infocat.co.uk
tosca1978
Posts: 101
Joined: Thu Oct 20, 2011 6:53 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007
Location: London, UK

Re: DBRA formula returning KEY_ERR

Post by tosca1978 »

Steve/Lotsaram,

I have replaced with DRW and now F9 works fine.

many thanks to you both for your help.
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: DBRA formula returning KEY_ERR

Post 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.
DeeDee
Posts: 13
Joined: Sat May 22, 2010 2:58 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2007

Re: DBRA formula returning KEY_ERR

Post 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!
Post Reply