Search code examples
powerbidaxpowerbi-desktopmeasure

COUNTROW() is ignoring the filter slicer


I have a measure as below, but it ignores the slicer filter. how to get around with this ? many thanks in advance.

measure = 

  CALCULATE (
        COUNTROWS( 'df' )
                   , 'df'[column name] IN { "col1", "col2", "col3" }
        )

Solution

  • Try this:

    measure = 
    
      CALCULATE (
            COUNTROWS( 'df' ),
            FILTER(ALLSELECTED('df'[column name]) ,
            'df'[column name] IN { "col1", "col2", "col3" }
            ))