DB function is not pulling data from the source cube

Post Reply
lynnsong986
Posts: 83
Joined: Wed Feb 28, 2018 2:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2016

DB function is not pulling data from the source cube

Post by lynnsong986 »

Hello I'm new to TM1 and am stuck with the DB function in a very simple rule.

I have a cube (source cube "Submetering Building Number of Units") with 3 dimentions:

Projects: there are in total 250 projects in this dimension
Type of projects : each project is tagged as "electric", "water", "gas" or "BTU", so in total 4 elements in Type dimension
Number of Units in Project: each project has a number of units in it

I have another cube (target cube) calculating revenue per project with Projects and Type of Projects dimensions as part of it. and I'm trying to pull the number of units from the source cube to the target cube where "number of units" is an element in its measure dimension.

the rule I'm having trouble with is:

['Number of Units']=N:DB('Submetering Building Number of Units',!Submetering Projects,!Submetering Services);

it doesn't work, nothing being pulled in and I have no idea where I did wrong. Can someone please kindly help? I'm an absolute beginner, my apologies if this question is stupid...

thanks in advance!
tomok
MVP
Posts: 2831
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: DB function is not pulling data from the source cube

Post by tomok »

You say:
lynnsong986 wrote: Tue Sep 10, 2019 9:13 pm I have a cube (source cube "Submetering Building Number of Units") with 3 dimentions:
Yet your rule:
lynnsong986 wrote: Tue Sep 10, 2019 9:13 pm ['Number of Units']=N:DB('Submetering Building Number of Units',!Submetering Projects,!Submetering Services);
Has only two dimensions listed.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
lynnsong986
Posts: 83
Joined: Wed Feb 28, 2018 2:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2016

Re: DB function is not pulling data from the source cube

Post by lynnsong986 »

Thanks for helping me out!

I’ll add the 3rd dimension tomorrow, but I thought I could omit it in the rule because it is the only intersection defined by the other two dimension in the source cube?
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: DB function is not pulling data from the source cube

Post by Wim Gielis »

No, you have to be rather explicit there, and reference 1 element in (1 hierarchy of) the target dimensions. It could be level 0 or consolidated, it could be retrieved with whatever logic you deem necessary (like an attribute or string concatenation or other) but eventually what you mention as arguments in the DB should lead to valid element names (or alias values).
Best regards,

Wim Gielis

IBM Champion 2024
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
lynnsong986
Posts: 83
Joined: Wed Feb 28, 2018 2:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2016

Re: DB function is not pulling data from the source cube

Post by lynnsong986 »

Thank you so much Wim, it is now working! I'm going to take some courses at the end of this month on Rules and TI. Hopefully I'll ask more meaningful questions after that!!
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: DB function is not pulling data from the source cube

Post by Wim Gielis »

You're welcome, good luck with the courses.
Best regards,

Wim Gielis

IBM Champion 2024
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