Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

IsFiltered for 2 slicers

Hi, 

 

I'm following this article and trying to do isfiltered for 2 slicers. 

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

 

I want to do this part with 2 slicers.

Check Filtered = 
   IF(
      ISFILTERED(Products[Category]),
      1,
      0
   )

Can anyone point me in the right direction? 

Thanks. 

  • Hi Anonymous 

     

    Try this:

    Check Filtered = 
    IF(
        ISFILTERED( Table1[Column1] )
        && ISFILTERED( Table2[Column2] ),
        1,
        0
    )

     

    Best regards,
    Martyn


    If I answered your question, please help others by accepting it as a solution.

     

3 Replies

  • Hi Anonymous 

     

    Try this:

    Check Filtered = 
    IF(
        ISFILTERED( Table1[Column1] )
        && ISFILTERED( Table2[Column2] ),
        1,
        0
    )

     

    Best regards,
    Martyn


    If I answered your question, please help others by accepting it as a solution.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      MartynRamsden Thank you, that worked great. Do you also know the command for ISFILTERED with OR?

      • MartynRamsden's avatar
        MartynRamsden
        Icon for Solution Sage rankSolution Sage

        Hi Anonymous 

         

        The DAX operator for OR is a double pipe '||' so your expression would be:

        Check Filtered = 
        IF(
            ISFILTERED( Table1[Column1] )
            || ISFILTERED( Table2[Column2] ),
            1,
            0
        )

         

        Best regards,
        Martyn


        If I answered your question, please help others by accepting it as a solution.