Question about DB

Post Reply
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Question about DB

Post by Kazêh »

hello everyone,
quick question about DB functions:

is it posible to select many members from a dimension in a DB funciont? ..something like this : DB(' Cube Name', !dim1, !dim2, 'dim3':{'element1', 'element2'....etc);
i know you can select many members in the source cube with this:
['Dimension': {'Elem1', 'Elem2','...'] = N: ......

but i dont know about DB functions, im looking at the manuals right know, but if somebody know if is posible i woulb be grateful if you tell me.
So i will leave this here just in case, and continue my reaserch . i will post the answer if i find it.

Thanks for any help or tips.
tomok
MVP
Posts: 2836
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: Question about DB

Post by tomok »

Kazêh wrote:hello everyone,
quick question about DB functions:

is it posible to select many members from a dimension in a DB funciont? ..something like this : DB(' Cube Name', !dim1, !dim2, 'dim3':{'element1', 'element2'....etc);
i know you can select many members in the source cube with this:
['Dimension': {'Elem1', 'Elem2','...'] = N: ......

but i dont know about DB functions, im looking at the manuals right know, but if somebody know if is posible i woulb be grateful if you tell me.
So i will leave this here just in case, and continue my reaserch . i will post the answer if i find it.

Thanks for any help or tips.
You must supply one, and only one, element form each dimension in the DB function.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Question about DB

Post by Kazêh »

thanks tomok for the quick reply
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Question about DB

Post by EvgenyT »

You must supply one, and only one, element form each dimension in the DB function
Or if you are looking to get a value of several element, you can reference a consolidation...like....DB(' Cube Name', !dim1, !dim2, 'Consolidation Example'...etc);

Thanks

ET
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: Question about DB

Post by asj105 »

Kazêh wrote:is it posible to select many members from a dimension in a DB funciont? ..something like this : DB(' Cube Name', !dim1, !dim2, 'dim3':{'element1', 'element2'....etc);
i know you can select many members in the source cube with this:
['Dimension': {'Elem1', 'Elem2','...'] = N: ......
You can select multiple elements in DB provided those are matching elements for you left side selection of Formula, for that you need to give !Dimensionname instead of single element from that particular dimension.
for e.g.
['Dimension': {'Elem1', 'Elem2','...'] = N: ......DB(' Cube Name', !dim1, !dim2,!Dimension);

provided Elem1, Elem2 are the members of Target Cubes dimension.
Amol J
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Question about DB

Post by Duncan P »

It helps to understand if you have a different perspective on the rule statement.

The statement is in two parts, separated by the equal sign (=). The left side is the area of applicability and the right side is the definition expression.

The area is specified by a number of elements in each dimension. If none are specified for a given dimension then all are assumed. This specifies a "hyper-rectangular" region (think "rectangle" in however many dimensions the cube has) for each cell of which the value is given by executing the definition expression in the context of that cell. This context means that anywhere it meets !dimension_name it will substitute the name of the element on that dimension of the cell being calculated. The result of executing the definition expression is the "value" of that cell.

If a cell happens to be in two or more areas then TM1 uses the definition to the right of the first one it finds (working from the top). Only if in executing the expression it comes across the word CONTINUE will it stop executing that expression and look for the cell in areas further down. If it finds another match then it will execute its definition expression and use that value.

The execution is in response to a request for the value of one cell. Thus it can only return one value and each part of it can also return only one value. If more than one cell is requested (by a view for example) this process is done separately for each cell requested.

Sorry about the over-use of emphasis.
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Question about DB

Post by Kazêh »

Sorry about the over-use of emphasis.
it's ok, i guess. thanks for all the tips everyone.
Kazeh. ;)
Post Reply