KEY_ERROR and #VALUE from F9

Post Reply
geneticjim
Posts: 15
Joined: Fri May 22, 2015 3:44 pm
OLAP Product: TM1
Version: 10.2.2 FP7
Excel Version: 2016
Location: California

KEY_ERROR and #VALUE from F9

Post by geneticjim »

Hi everyone,

I was wondering if anyone else has run into this issue? Several of us end-users are getting this and I am not sure why. I can open my slice that has been saved and it will be fine but the moment I click F9, then I get either *KEY_ERR or #VALUE. However, if I click in the cell and then click Enter, my value is there.

I have found that if I simply click F9 and then Save, the save will not resolve. What I have to do is click in a cell, click Enter to get a value, and then click Save. Then, once the save is done all is okay.

This is happening with several different spreadsheets. Yes, I am connected to the TM1 server instance. My calc is on Manual calc and calc on Save - not Automatic.

In my screenshot, I show pointing to an excel tab called Control for a couple values, but even if those aren't there, I still have the issue so it doesn't appear to be related. This is from the same spreadsheet that I have another thread on regarding multi-threaded calc, but this happens in various spreadsheets.

I was wondering if anyone else has experienced this and how you got around it? Thanks a lot!
VALUE and KEY_ERR issue.jpg
VALUE and KEY_ERR issue.jpg (127.87 KiB) Viewed 7040 times
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: KEY_ERROR and #VALUE from F9

Post by Alan Kirk »

geneticjim wrote: I was wondering if anyone else has run into this issue? Several of us end-users are getting this and I am not sure why. I can open my slice that has been saved and it will be fine but the moment I click F9, then I get either *KEY_ERR or #VALUE. However, if I click in the cell and then click Enter, my value is there.
In 99.9 to infinity percent of cases like these, the reason is that you have a DBRW formula which is pointing to a cell which has another DBRW formula. The second formula is used to get one of the element names for the first one.

DBRWs are processed in batches so the first formula can't know what the result of the second formula will be until it's finished processing... and by then it's too late. The first formula has no idea which element to use, and therefore throws a Key Error. When you manually calculate the cell, however, the second formula isn't being calculated at the same time. Consequently the first formula knows the element name that it needs to be looking at.

The solution is to make the second formula a DBR rather than a DBRW. DBRs are calculated beforfe DBRWs, and one at a time.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Wim Gielis
MVP
Posts: 3234
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: KEY_ERROR and #VALUE from F9

Post by Wim Gielis »

Most likely it is what Alan wrote above, but mind you,
I have seen this behaviour without DBRW's pointing to other DBRW's.
But then again, that was when using Active forms and I guess Active forms just don't like me.
Others seem to not have the kind of issues I have with Active forms.

So let's hope it is solved if you follow Alan's advice of using DBR.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
geneticjim
Posts: 15
Joined: Fri May 22, 2015 3:44 pm
OLAP Product: TM1
Version: 10.2.2 FP7
Excel Version: 2016
Location: California

Re: KEY_ERROR and #VALUE from F9

Post by geneticjim »

Thanks a lot, guys! You know what, on my spreadsheet, I changed the DBRW to DBR and it, indeed, took care of the flakiness! :) Very happy about that. I had to think through what cells were pointing to what, etc. and then changed only some of them - not all.

There are some that are getting this odd behavior simply with a slice. Nothing special, nothing altered, just a simple slice. I don't know all the details so will gather those when I am able and come back to update. I've gotten tied up with some other things. I did want to let you know that using DBR resolved my issues though and thank you!!! I'll post more details on the other as soon as I can.

Thanks!
Wim Gielis
MVP
Posts: 3234
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: KEY_ERROR and #VALUE from F9

Post by Wim Gielis »

geneticjim wrote:There are some that are getting this odd behavior simply with a slice. Nothing special, nothing altered, just a simple slice.
I would be interested in seeing that, so yes, please post again when time is available.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply