Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Laila92
Helper V
Helper V

Measure to test for 'Select all' in slicer returns blank

I have a slicer, and I want the visuals in my report to be blank when nothing is selected. If found different measures in the forum:

 

 

1. Slicercheck = ISFILTERED ( 'Deals'[Customer])

 

 

2.

 

 

SlicerCheck =if(calculate(distinctcount(Deals[Customer]),allselected([Deals[Customer]]))=1,"Y","N")

 

 

(My slicer is on column 'Deals'[Customer] )

They both work, except for when I click 'Select All' in the slicer. Then it acts like nothing is selected. Also 

 

 

 Selected = ISFILTERED('Deals[Customer])

 

 

Returns empty when selecting 'select all'

Any tips? I saw a post from 3 years back with the same issue, and no solution. Maybe something has changed now?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Laila92 ,

 

can you please elaborate a little more on what will be the difference if "all" available items are selected, meaning checked, instead of none items are selected

From a technical perspective, all items selected has same effect as none items are selected. In both cases, the table and related tables will not be filtered.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

6 REPLIES 6
JeffCarmo
New Member

Hi everyone, 

I look for any solution and in my tests I have found this solution:

Measure 1= 

var _valuesSelectedTable1 = CALCULATE(COUNTROWS([Table1]), ALLEXCEPT([Table1],Table1[Column]))

var _allRowsTable1 = COUNTROWS(ALL(Table1))
var _check =  IF(_valuesSelectedTable1 < _allRowsTable1 -1,TRUE(),FALSE())
return 
IF(_check, "YOUR SELECT VALUES", "ALL VALUES SELECTED")
jdbuchanan71
Super User
Super User

I don't think there is a way to check for that.  It's something that only exists in the slicer.

v-xicai
Community Support
Community Support

Hi   @Laila92 ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

jdbuchanan71
Super User
Super User

Hello @Laila92 

"Select All" is really telling the DAX engine to apply no filter.  2 & 3 are the same thing to DAX.

2020-04-22_13-26-56.jpg

So ISFILTERED = FALSE means nothing is selected (no filter applied).

Do you know how to check if SELECT ALL is selected or not?

TomMartens
Super User
Super User

Hey @Laila92 ,

 

can you please elaborate a little more on what will be the difference if "all" available items are selected, meaning checked, instead of none items are selected

From a technical perspective, all items selected has same effect as none items are selected. In both cases, the table and related tables will not be filtered.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.