Search code examples
multidimensional-arrayssasmdxdaxtabular

DAX: How to check if (All) value selected for specific Dimension


I have a task to convert existing MDX measures (from multidimensional model) into DAX (tabular model). There is a part of code which I'm doing right now:

IIF( [Product].[Status].Level IS [Product].[Status].[(All)] AND [Product].[Brand].Level IS [Product].[Brand].[(All)] AND [Product].[Category].Level IS [Product].[Category].[(All)] ,[Measures].[Full_Amount] ,NULL )

enter image description here

How can I do the same on DAX? The problem is to check that .[(All)] member is selected. Do we have the same option n DAX?


Solution

  • As @RADO mentions you can do something like this in DAX:

    IF(
       NOT ISFILTERED( Product[Status] )
       && NOT ISFILTERED( Product[Brand] )
       && NOT ISFILTERED( Product[Category] ),
      [Measures].[Full_Amount],
      BLANK()
    )