Question
· Aug 8, 2019

Equivalent of ISCROSSFILTERED with MDX

is there a script with MDX language that's works like the function ISCROSSFILTERED in DAX?

ISLEAF() doesn't work if I select more than one member in the slier.

Thank you for your help.

Discussion (2)1
Log in or sign up to continue

Hi Hamza,

I don't believe there is an MDX function that works the same way as ISCROSSFILTERED(). If you'd like to describe what you hope to do using this function, I'll let you know if I can think of a practical way to do this with MDX. To identify whether a query is using filters on the cube in question or a related cube, I would probably try to get the MDX query text and parse it, looking for %FILTER and WHERE clauses, but that would have to be done from outside of the query itself (e.g. in ObjectScript).

Hi Samuel,

I wanted to develop a measure that works with 2 differents ways : 

                        -      If the user filter a dimension1 then the Measure do something

                        -      If he doent use it then the measure will do something else.

And yes like you said, there is no function in MDX can detect if a dimension is used on filter or not. But I found a trick to do it :

I created a Measures Group  that contains 2 columns : The ID of the dimension that I want to detect and a boolean measure (0 or 1) , this table will contains all the ID of the dimension and the second column with 1 and 1 more line with ID = null and and the second columns = 0. Then I test if this measure = 0 (that means the dimension is not filtered) or  1( Dimension filtered)