Hi,
I am building an employee budget setting model in TM1 10.1.1 and am trying to make my dimension updates as dynamic as possible.
One of the dimensions, Pay Scales, includes a picklist cube which allows users to pick a Scale Code, for example, teachers and then return only the grades within that group. i.e. a cascading picklist. This is done by referring to a subset which includes all leaf elements under the relevant Scale Code.
The logic for this is included within the rule for the picklist cube and the first few lines are shown below:
['Current Grade']=S:
If(DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code')@='SC_NJC',
'Subset:Pay Scales:SC_NJC',
IF
(DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code')@='SC_A4C',
'Subset:Pay Scales:SC_A4C',
etc,
etc,
etc))))
My question is, how do I make this dynamic if new Scale Codes are added? Can I automatically update the rule file using a TI process if new Scale Codes appear?
I was thinking that I could include this as part of the process which updates the Pay Scales dimension.
If not do I have to manually update the rules?
Updating rules using a TI process
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Updating rules using a TI process
Try this approach:
It's much faster (due to having only one IF statement - and even that one is not really needed) and open to any future expansions of Scale Code.
Code: Select all
['Current Grade'] = S:
IF( DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code') @<> '',
'Subset:Pay Scales:' | DB('Staffing-Budget-Setting',!Employee,!Job Number,!Cost Centre,!Detail Code,!Year,!Versions,'Scale Code'),
''
);
Kamil Arendt
-
- Community Contributor
- Posts: 296
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: Updating rules using a TI process
Thanks for the reply.
We are currently undergoing user testing and while this is going on I am updating my documentation and looking at where I can improve the model.
I will look at your solution once this testing is over and update the thread.
We are currently undergoing user testing and while this is going on I am updating my documentation and looking at where I can improve the model.
I will look at your solution once this testing is over and update the thread.
-
- Community Contributor
- Posts: 296
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: Updating rules using a TI process
Hi Kamil,
have updated my rule with your code and this appears to work!
So big thanks for that.
Just wish I had thought of it!
regards, Mark
have updated my rule with your code and this appears to work!
So big thanks for that.
Just wish I had thought of it!
regards, Mark