TM1 rule calculation problem with decimal places

Post Reply
stw
Posts: 2
Joined: Mon Sep 15, 2014 8:42 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2013

TM1 rule calculation problem with decimal places

Post by stw »

Hello,

I have a problem in TM1 9.5.2 (9.5.20100.18046, 64 Bit, Excel 2013, Perspectives) with data with decimal places in tm1 rule calculations.

In this example, I have a time dimension
( ‘Time’,
consolidated element: Year
leaf Elements: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sept, Oct, Nov, Dec)

and a measure dimension:
‘measures’ with two measures (‘measure1’ , ‘measure2’)

I have a rule that looks for ‘measure2’ / ‘Year’:

Rule:

['measure1'] =N:if(['measure2,'Year']= 100, 100, 1);

If the measure2 is 100 , then the measure1 should be 100, too (for the leaf elements)

This works fine, but if I use 4 decimal places for the leaf elements even if the measure2 is 100 for year, in some cases like the one in the picture attached,
the rule behaves like the measure2 is not 100. The separator for the decimal places is ‘,’ .
Am I doing something wrong or might this be a tm1 bug (rounding problem) ?

Thanks in advance,

Steffi
Attachments
tm1_rule_prob.png
tm1_rule_prob.png (29.53 KiB) Viewed 3890 times
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: TM1 rule calculation problem with decimal places

Post by declanr »

is the value actually 100 EXACTLY? Because that is what your rule is looking for it to be but since your screenshot is to just a few decimal places it is not possible to tell.
Declan Rodger
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: TM1 rule calculation problem with decimal places

Post by jim wood »

I agree with Declan. It looks like a formatting issue, rather than a rule issue.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
stw
Posts: 2
Joined: Mon Sep 15, 2014 8:42 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2013

Re: TM1 rule calculation problem with decimal places

Post by stw »

Hi and thanks for your replies,

@Declan: Yes, the value is exactly 100 .
I have entered the values manually as you can see them in the screenshot .
Now the strange thing is that if I switch the values of Sep and Oct (6,9124 and 6,9136) it works and if I Switch them back, it doesn't work again.
The weight of all leaf elements is default (1)

Regards,

Steffi
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: TM1 rule calculation problem with decimal places

Post by jim wood »

Are there any other rules higher up the rule file that could be causing this?
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
lotsaram
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: TM1 rule calculation problem with decimal places

Post by lotsaram »

stw wrote:Hi and thanks for your replies,

@Declan: Yes, the value is exactly 100 .
I have entered the values manually as you can see them in the screenshot .
Now the strange thing is that if I switch the values of Sep and Oct (6,9124 and 6,9136) it works and if I Switch them back, it doesn't work again.
The weight of all leaf elements is default (1)

Regards,

Steffi
Could be an issue with how the numbers are stored as floating point long decimal. How exactingly does the result need to sum to 100?
Why not IF( RoundP(['measure2','Year'],5) = 100, 100, 1 )
If it is because the sum is actually evaluating as 99.9999999999 or 100.0000000001 then adding rounding into the if test should solve it.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply