Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Show Values with Select All when using filtered function

Hi , 

 

I am using 

Measure = CALCULATE ( IF ( ISFILTERED ( TERM[TermName]), 1, 0 ), ALLSELECTED ( CUSTOMERTABLE ) )
 
to show blank values in visual when nothing is selected. I set the visual filter to "1" and it works for the selected filter. However, when I click "select all" the visual is still blank - how do I fix this?
  • Hi, Anonymous  

    This is the expected behavior if you are using the default slicer in Powerbi Desktop. 

    Based on my test,when the slicer ‘select all’ is checked, it is actually equivalent to ‘nothing is selected’. This is by design, it just makes the slice appear to be in an all-selected state.

    Therefore, when you use isfiltered to force the visual  to show blank values when ‘nothing is selected’, the visual also show blank values when 'all selected' is checked.

     

    As a workaround, you can try to use  Hierarchical filter.

     

    Best Regards,
    Community Support Team _ Eason

     

3 Replies

  • Hi Anonymous 

    Try this

    Measure = CALCULATE( IF( ISBLANK(SELECTEDVALUE('TERM'[TermName])) && DISTINCTCOUNT('TERM'[TermName]) = COUNTROWS(ALL('TERM')),0,1), ALLSELECTED( CUSTOMERTABLE))

    Regards

    Phil

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Phil, 

       

      Thank you for your reply. This solution does not show a blank visual when there is nothing filtered. Could you help with troubleshooting

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, Anonymous  

    This is the expected behavior if you are using the default slicer in Powerbi Desktop. 

    Based on my test,when the slicer ‘select all’ is checked, it is actually equivalent to ‘nothing is selected’. This is by design, it just makes the slice appear to be in an all-selected state.

    Therefore, when you use isfiltered to force the visual  to show blank values when ‘nothing is selected’, the visual also show blank values when 'all selected' is checked.

     

    As a workaround, you can try to use  Hierarchical filter.

     

    Best Regards,
    Community Support Team _ Eason