Page 1 of 1

How to select a given number of elements from the dimension?

Posted: Thu Apr 14, 2022 7:54 pm
by VV_VV
Hello,

I have a line item dimension with the elements from 1 to 100. I'd like to give a user an ability to select the first 5, 10, ext. elements on the websheet. The dimension is used in the allocation cube, so one value can be allocated to three line items or five, or fifteen. The number should be flexible. I know about TOPCOUNT function, but it's based on the values, which is not what I need. Is there an MDX function that can be applied to the dimension subset to select as many elements as needed?

Re: How to select a given number of elements from the dimension?

Posted: Thu Apr 14, 2022 8:59 pm
by declanr
You want to use the HEAD function in MDX:

https://docs.microsoft.com/en-us/sql/md ... rver-ver15

Re: How to select a given number of elements from the dimension?

Posted: Fri Apr 15, 2022 3:14 pm
by 20 Ton Squirrel
You could also set up a number of subsets beforehand, just name each subset according to their selection. A TI process could do a one-time automation of that tedium.

Declan's response is far more efficient, though, I must admit. ;)