Want to Know Use of DIMNM & DIMIX Function ?

Locked
Abhi30
Posts: 11
Joined: Mon Aug 08, 2016 1:45 pm
OLAP Product: Ibm Cognos
Version: 10.2.2
Excel Version: 2016
Location: Mumbai

Want to Know Use of DIMNM & DIMIX Function ?

Post by Abhi30 »

Hello all,,

I want to use DIMNM & DIMIX function to get values from each month. In my cube their is travel tyle e.g Bus,Air,Train and Accomodation e.g Hotel,Apartment,Lodge
i want value from another cube as per the selection from picklist e.g Travel Type=Bus, Accomodation=Hotel and Month=Jan then the value should be as per the jan month as declared in another cube for it. Can i use it in IF Function??
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: Want to Know Use of DIMNM & DIMIX Function ?

Post by Wim Gielis »

Hello

Welcome to the forum.

You would typically use the DB() function to retrieve the value,
and nested in the DB() you will have other DB() functions to retrieve the picklist values.

Gives this a try and let us know how you advance.
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
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Want to Know Use of DIMNM & DIMIX Function ?

Post by BariAbdul »

You could also look at the Chapter 7. Rules for Time-Based Calculations in the TM1 rules guide,It explains well using of Diimix and DName.Thanks
"You Never Fail Until You Stop Trying......"
Abhi30
Posts: 11
Joined: Mon Aug 08, 2016 1:45 pm
OLAP Product: Ibm Cognos
Version: 10.2.2
Excel Version: 2016
Location: Mumbai

Re: Want to Know Use of DIMNM & DIMIX Function ?

Post by Abhi30 »

I am using DB() Already like...['Travel Rate/Day' ] = N: IF(DB('2r_Hotel',!2a_Employee_Name,'Travel')@='Bus'& DB('2r_Hotel', !2a_Employee_Name, 'Month Of Travel')@='Jan',DB('2r_Hotel_Expenses', 'Jan','Bus')
but the code was getting to lengthy for each month adn each type

i want to add all month values like if its Feb then it displays feb value??
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Want to Know Use of DIMNM & DIMIX Function ?

Post by Steve Rowe »

You can substitute the values of the DB for the dim reference, you don't need to do conditional references.

i.e.
IF(DB('2r_Hotel',!2a_Employee_Name,'Travel')@='Bus'& DB('2r_Hotel', !2a_Employee_Name, 'Month Of Travel')@='Jan',DB('2r_Hotel_Expenses', 'Jan','Bus')
can be replaced with
DB('2r_Hotel_Expenses', DB('2r_Hotel', !2a_Employee_Name, 'Month Of Travel'),DB('2r_Hotel',!2a_Employee_Name,'Travel'))

non-matching references will fail silently.

(Oh I'd really suggest some training, this is super basic stuff...)
Cheers
Technical Director
www.infocat.co.uk
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: Want to Know Use of DIMNM & DIMIX Function ?

Post by Wim Gielis »

Please think about a proper design of your cubes and dimensions. Do this FIRST, before writing rules.
You should not write lengthy IF statements. A DB nested in a DB should suffice.
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
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: Want to Know Use of DIMNM & DIMIX Function ?

Post by Wim Gielis »

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
Locked