Page 1 of 1
Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 6:50 am
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??
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 7:26 am
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.
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 7:38 am
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
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 7:44 am
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??
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 8:14 am
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
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Tue Aug 09, 2016 8:15 am
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.
Re: Want to Know Use of DIMNM & DIMIX Function ?
Posted: Wed Aug 10, 2016 11:44 am
by Wim Gielis