Ideas and tips for enhancing your TM1 application
20 Ton Squirrel
Posts: 71 Joined: Tue Jul 14, 2020 9:53 pm
OLAP Product: TM1
Version: Planning Analytics with Watson
Excel Version: Office 365
Location: Houston, TX
Post
by 20 Ton Squirrel » Fri Feb 05, 2021 3:29 pm
TM1 lacks the CEILING and FLOOR functions but I recently set about emulating them formulaically. I hope posting this here helps someone in the Distant Dark Future™
Code: Select all
[ 'Ceiling' ] = N:
( INT ( [ 'Value' ] \ [ 'Significance' ] )
- IF ( [ 'Value' ] \ [ 'Significance' ] - INT ( [ 'Value' ] \ [ 'Significance' ] ) > 0
, -1
, 0
)
) * [ 'Significance' ] ;
[ 'Floor' ] = N:
INT ( [ 'Value' ] \ [ 'Significance' ] ) * [ 'Significance' ] ;
War teaches us geography, getting old teaches us biology.
jim wood
Site Admin
Posts: 3958 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:
Post
by jim wood » Fri Feb 05, 2021 4:54 pm
You should put this in the useful code section of the site. It's very useful and in the main forum it will get moved down quickly. Let me know if you'd like it moved over there?
Jim.
20 Ton Squirrel
Posts: 71 Joined: Tue Jul 14, 2020 9:53 pm
OLAP Product: TM1
Version: Planning Analytics with Watson
Excel Version: Office 365
Location: Houston, TX
Post
by 20 Ton Squirrel » Fri Feb 05, 2021 5:41 pm
Sure! Scoot it on over there. Thanks, Jim!
War teaches us geography, getting old teaches us biology.