DB function is not pulling data from the source cube

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

DB function is not pulling data from the source cube

Post by lynnsong986 » Tue Sep 10, 2019 9:13 pm

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: 2599
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 » Tue Sep 10, 2019 10:28 pm

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: 10
Joined: Wed Feb 28, 2018 2:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

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

Post by lynnsong986 » Tue Sep 10, 2019 10:52 pm

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: 2152
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.7
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

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

Post by Wim Gielis » Wed Sep 11, 2019 12:00 am

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

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 service with AutoHotKey

lynnsong986
Posts: 10
Joined: Wed Feb 28, 2018 2:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

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

Post by lynnsong986 » Wed Sep 11, 2019 7:09 pm

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: 2152
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.7
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

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

Post by Wim Gielis » Wed Sep 11, 2019 7:21 pm

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

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 service with AutoHotKey

Post Reply