Page 1 of 1

Rule not working if I change the order

Posted: Mon Sep 26, 2016 3:30 am
by diegoweichafe
Hi All,

Thanks for your help,

really need to figure out this issue with TM1
2.png
2.png (74.01 KiB) Viewed 4262 times
1.png
1.png (76.48 KiB) Viewed 4262 times
3.png
3.png (69.07 KiB) Viewed 4262 times
as you can see in both pictures.. I'm applying a rule for C: and N: level that shouldn't affect each other..but somehow they do it... but if I change the order or comment out the lines the results change to... even when they are being applied to different areas of the cube (N: and C: Level)

I would really appreciate your help to know how to solve this issue

thanks you very much

Re: Rule not working if I change the order

Posted: Mon Sep 26, 2016 4:09 am
by lotsaram
Always put the N rule first.

Re: Rule not working if I change the order

Posted: Mon Sep 26, 2016 6:41 am
by Andy Key
diegoweichafe wrote:...even when they are being applied to different areas of the cube (N: and C: Level)...
From a TM1 terminology point of view, your rules are not applied to different areas. The definition of a rule is:

Code: Select all

[Area] = [Qualifier] [Formula];
The [Area] part of a rule is everything to the left hand side of the equals sign, so in your case the [Area] is the same. The N: and C: (or blank, or S: as appropriate) are Qualifiers that indicate what type of cells within the [Area] that the [Formula] applies to.

Check the setting for AllowSeparateNandCRules in your config file. You'll probably find that this is either not present or set to F.

If this is the case and you don't want to change that, then you will need to use the extended format of the above:

Code: Select all

[Area] = N: [N level Formula]; C: [C level Formula];
i.e.

Code: Select all

['Forecast Base', 'OCR'] = N: If(...); C: 1;
If you want to have the flexibility of two rules on separate lines repeating the ['Forecast Base', 'OCR'] then set AllowSeparateNandCRules to T (changing it will require a server restart). Obviously you need to understand how this may affect other rules in your system.

Re: Rule not working if I change the order

Posted: Mon Sep 26, 2016 6:41 am
by Andy Key
diegoweichafe wrote:...even when they are being applied to different areas of the cube (N: and C: Level)...
From a TM1 terminology point of view, your rules are not applied to different areas. The definition of a rule is:

Code: Select all

[Area] = [Qualifier] [Formula];
The [Area] part of a rule is everything to the left hand side of the equals sign, so in your case the [Area] is the same. The N: and C: (or blank, or S: as appropriate) are Qualifiers that indicate what type of cells within the [Area] that the [Formula] applies to.

Check the setting for AllowSeparateNandCRules in your config file. You'll probably find that this is either not present or set to F.

If this is the case and you don't want to change that, then you will need to use the extended format of the above:

Code: Select all

[Area] = N: [N level Formula]; C: [C level Formula];
i.e.

Code: Select all

['Forecast Base', 'OCR'] = N: If(...); C: 1;
If you want to have the flexibility of two rules on separate lines repeating the ['Forecast Base', 'OCR'] then set AllowSeparateNandCRules to T (changing it will require a server restart). Obviously you need to understand how this may affect other rules in your system.