Hi Experts, 'm back with a question.
I'm confused on how to place dynamic objects on Left side of rule. I tried below but it errors. I actually want the right side to be a look up from another cube.
[!}Cubes, !}Groups] = S: 'READ';
do i write as below?
[] = S: DB('my_cube', !}Cubes, !}Groups, 'Permission');
thanks in advance.
What is correct way to write TM1 rule.
-
- Posts: 88
- Joined: Mon Oct 24, 2016 1:21 pm
- OLAP Product: TM1
- Version: TM1 Perspectives 10
- Excel Version: Excel 2016
-
- Community Contributor
- Posts: 312
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: What is correct way to write TM1 rule.
Did you try the second option you noted and did it work?
-
- Posts: 88
- Joined: Mon Oct 24, 2016 1:21 pm
- OLAP Product: TM1
- Version: TM1 Perspectives 10
- Excel Version: Excel 2016
Re: What is correct way to write TM1 rule.
thanks, second option seem to work yes.
Is there any way to refer to elements in below fashion (LEFT Side) ?
[!}Cubes, !}Groups] = S: 'READ';
Is there any way to refer to elements in below fashion (LEFT Side) ?
[!}Cubes, !}Groups] = S: 'READ';
-
- Community Contributor
- Posts: 312
- Joined: Fri Feb 15, 2013 5:49 pm
- OLAP Product: TM1
- Version: PA 2.0.9.1
- Excel Version: 365
- Location: Minneapolis, USA
Re: What is correct way to write TM1 rule.
Assuming then that your cube has dimensions "}Cubes" and "}Groups"? What you've written is the same as:
Code: Select all
[] = S:'READ';
Said another way, the !<dim> is already implied on the left for a rule that doesn't explicitly specify elements for that dimension. For example, if you have a 4 dim sales cube: Customer, Product, Time, Measure and the measure dim has measures like "quantity", "price", and "total sales". If you wrote a rule for Total Sales to be equal to quantity times price, the rule would look like this:
Code: Select all
['Total Sales'] = N:['Quantity'] * ['Price'];
Code: Select all
[!Customer, !Product, !Time, 'Total Sales'] = N:['Quantity'] * ['Price'];
-
- 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: What is correct way to write TM1 rule.
If you keep in mind the logic for a rules statements is as follows:
then you'll understand why you can't use dynamic values on the left hand side. If you don't specify a value on the left hand side of a rule for a specific dimension then it means all elements of that dimension. That's it, you either identify a specific value or ALL. If you want the assignment to be "dynamic" then you need to put it on the right-hand side and use IF logic.
Code: Select all
[Area of cube] = Rule calculation
-
- MVP
- Posts: 3703
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: What is correct way to write TM1 rule.
Yes. Any dimension omitted within square brackets (i.e. left hand OR right hand side) is implicitly unfiltered or "ALL". Or in other words same as !dimension within a DB() reference on the RHS.Ashleigh W wrote: ↑Mon Mar 30, 2020 2:51 pm thanks, second option seem to work yes.
Is there any way to refer to elements in below fashion (LEFT Side) ?
[!}Cubes, !}Groups] = S: 'READ';
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
-
- Posts: 88
- Joined: Mon Oct 24, 2016 1:21 pm
- OLAP Product: TM1
- Version: TM1 Perspectives 10
- Excel Version: Excel 2016
Re: What is correct way to write TM1 rule.
Thanks ascheevel, tomok and lotsaram. Your answers gave me much more clarity.