Page 1 of 1
MDX- Filter By Index
Posted: Thu Jul 28, 2016 7:25 am
by roei61
Hi Experts,
i'm looking for MDX that will filter all the 0 level elements that their index is greater than the index of other element in the dimension.
Does someone has a good idea how to do it?
Thanks
Re: MDX- Filter By Index
Posted: Thu Jul 28, 2016 9:27 am
by Steve Rowe
I'm pretty sure that MDX can't see the Index of an element so I think you would need to publish the Index to a cube using a rule or TI and then test against this which should be fairly straight forward with the help of the MDX Primer.
Re: MDX- Filter By Index
Posted: Thu Jul 28, 2016 9:31 am
by lotsaram
roei61 wrote:Hi Experts,
i'm looking for MDX that will filter all the 0 level elements that their index is greater than the index of other element in the dimension.
Does someone has a good idea how to do it?
Thanks
I haven't ever had a requirement exactly like this. Typically outside of the special case of time dimensions the index of elements is irrelevant for modeling in TM1.
But I imagine with the functions, Head, Tail & Lag that you should be able to knock up some MDX that would achieve this given the input of the element name to return all members either before or after.