MDX- Filter By Index

Post Reply
User avatar
roei61
Posts: 41
Joined: Wed Aug 22, 2012 5:44 am
OLAP Product: PAX
Version: 2.0.7
Excel Version: 2016
Location: Israel

MDX- Filter By Index

Post 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
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: MDX- Filter By Index

Post 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.
Technical Director
www.infocat.co.uk
lotsaram
MVP
Posts: 3701
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: MDX- Filter By Index

Post 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.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply