dynamic subset for last 5

Post Reply
Posts: 10
Joined: Mon Sep 18, 2017 9:12 am
OLAP Product: tm1
Version: 10.2.2
Excel Version: 2010

dynamic subset for last 5

Post by raman » Fri Sep 22, 2017 7:50 am

i wan to make a dynamic subset using expression which shows last 5 elements of dimension.
i used this

{drilldownlevelbottom({[segment].[all segments]},5)}

but this one is showing first 5.

Wim Gielis
Posts: 1748
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0
Excel Version: 2016
Location: Brussels, Belgium

Re: dynamic subset for last 5

Post by Wim Gielis » Fri Sep 22, 2017 8:14 am

The last 5 elements of a dimension, or the last 5 children/descendants ?

If the former:

{Tail( TM1SubsetAll( [segment] ), 5 )}

If the latter, I'll leave it as an exercise for you.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 105 TM1 articles and a lot of custom code
Newest blog article: Looping over input files

Post Reply