Number Formula

Post Reply
Jorge Rachid
Posts: 113
Joined: Fri Jul 22, 2016 8:33 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Number Formula

Post by Jorge Rachid »

Hi Everyone!

I have to do a formula with number, but I am facing some diffult.

I have these numbers:

1,81
2,00
1,71
1,69
2,00
1,44
2,00

And I would like these numbers after a formula as below:

1,80
2,00
1,70
1,65
2,00
1,40
2,00

It is the FLOOR formula from excel.

Does anyone have any idea how to do this on TM1?

I have thought about round and roundp but in this case it is not enough.

Thanks,

JR
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Number Formula

Post by Wim Gielis »

Code: Select all

AsciiOutput( 'test.txt', NumberToString( int(1.81/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(2.00/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(1.71/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(1.69/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(2.00/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(1.44/0.05) * 0.05 ));
AsciiOutput( 'test.txt', NumberToString( int(2.00/0.05) * 0.05 ));
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Jorge Rachid
Posts: 113
Joined: Fri Jul 22, 2016 8:33 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Number Formula

Post by Jorge Rachid »

Hi Wim.

I will try this tomorrow, but I simulated on excel and it works.

Thank you so much for helping me.

Best regards,

JR
Post Reply