Missing Variable in DB function but still work?

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Missing Variable in DB function but still work?

Post by macsir »

I just came across one case for missing variable in DB function but it looks like there is no error when compiling and it is successful.
e.g.

The complete one

Code: Select all

['LY_Progress'] = C:
DB('Reporting',STR(NUMBR(SUBST(!Scenario,1,4)) - 1,4,0) | SUBST(!Scenario,5,2),!Category,!Location,!Program,'E_1');
Missing category in the rule sheet

Code: Select all

['LY_Progress'] = C:
DB('Reporting',STR(NUMBR(SUBST(!Scenario,1,4)) - 1,4,0) | SUBST(!Scenario,5,2),!Location,!Program,'E_1');
I missed !Category but it is still successful for compiling and calculation is right?
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
asj105
Posts: 6
Joined: Mon Jun 25, 2012 7:49 am
OLAP Product: TM1
Version: 9.5 10.1.1 10.2
Excel Version: 2003

Re: Missing Variable in DB function but still work?

Post by asj105 »

As far as the syntax is correct TM1 rule editor wont give error , This is the case with your example, But it wont pull any value from your source cube :D. Check in your Target cube, if there is any value which has got pulled from your Source cube then it will be a confusing. let me know if you got any data got pulled from your source cube to target cube using incomplete DB statement which might be syntax wise correct.
Amol J
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Missing Variable in DB function but still work?

Post by macsir »

Yes, as you said. The value is not in the target cube but the rule sheet would not tell you any error if you miss the variables. Unless you put something it can recognize with the target cube, it will give you the error.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Post Reply