Hi there,
I am relatively new to TM1, have been developing a model for a few weeks now and learning on the job.
I am confused with the ordering of dimensions in rules and just need a quick explanation please?
I inherited a model which (among others) included the following 2 cubes and rule :-
Cube1 : Earnings (source cube for this rule)
Dimensions:
Year and Month
Earnings Year and Month
Products
Measures
Version
Cube2 : Revenue (destination cube for this rule)
Dimensions:
Year and Month
Products
Measures
Version
The key rule in the Revenue cube is as follows :-
['Earned Premium']=N:DB('Earnings', 'All Policy Months', !year and month, !Products, 'Earned Premium', !Version);
This worked fine. However when I rebuilt the two cubes myself, I unintentionally changed the order of the Earnings cube dimensions to :-
Earnings Year and Month
Products
Measures
Version
Year and Month
... and this way round the rule no longer calculated (presented zeroes). I realised my ordering error and used "Re-order dimensions" to fix it, but this had no effect on the rule. In the end I had to delete the cube and rebuild it, and re enter my data.
Can the initial order not be changed once a cube is created, and is this fundamental to the rules as I thought it was driven by the name, not the order?
Thanks
Ordering dimension names in rules
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Ordering dimension names in rules
Hi there. You're in luck as there are a few regular posters here who have many years experience with doing complex underwriting models in TM1. However I don't think you're at that point yet and your needs right now are more basic and fundamental!conflax wrote: ... The key rule in the Revenue cube is as follows :-
['Earned Premium']=N:DB('Earnings', 'All Policy Months', !year and month, !Products, 'Earned Premium', !Version);
This worked fine. However when I rebuilt the two cubes myself, I unintentionally changed the order of the Earnings cube dimensions to :-
Earnings Year and Month
Products
Measures
Version
Year and Month
... and this way round the rule no longer calculated (presented zeroes). I realised my ordering error and used "Re-order dimensions" to fix it, but this had no effect on the rule. In the end I had to delete the cube and rebuild it, and re enter my data.
Can the initial order not be changed once a cube is created, and is this fundamental to the rules as I thought it was driven by the name, not the order?
Thanks
1/ Initial dimension order of a cube is fundamental and cannot be changed once set. The "re-ordering" option is for performance optimization in the backend database only. All GellGet, CellPut, DBRW and DB references must always use the original ordering in which the cube was built
2/ Within a rule the square bracket notation used in the area statement (LHS) or RHS of a rule equation doesn't care about dimension order, the rule engine searches the dimensions for a match and automatically resolves the order, but within a DB() reference used for inter-cube rules the order given must be as per initial cube ordering
-
- Posts: 47
- Joined: Thu Jun 07, 2012 10:20 am
- OLAP Product: TM1
- Version: Various
- Excel Version: Various
- Location: UK
Re: Ordering dimension names in rules
Thanks yes still trying to get the basics right first
Cheers
Cheers