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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MohannadSh1996
Microsoft Employee
Microsoft Employee

Check if all values in filters are selected (DAX)

Hi,

Is there a way to check if all values in a specified filter are selected using DAX functions knowing that number of choices in filter are limited?

Thanks in advance 😊

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@MohannadSh1996 , not very clear.

Any value is filtered can be checked with isfiltered

example: if not filtered display 0 else count

Count Brant not all = if(ISFILTERED('Item'[Brand]),DISTINCTCOUNT('Item'[Brand]),0)

 

refer : https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi @MohannadSh1996 ,

You can create a measure as below:

Count of selected items =
VAR _selClient =
    ALLSELECTED ( 'Table'[Client] )
RETURN
    CALCULATE ( COUNT ( 'Table'[Client] ), 'Table'[Client] IN _selClient )

slicer selected items.JPG

You can also refer the contents in the following links to get it.

Get selected or multiple values from slicers using DAX

How to count how many items are selected on a Slicer

Best Regards

Rena

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@MohannadSh1996 , not very clear.

Any value is filtered can be checked with isfiltered

example: if not filtered display 0 else count

Count Brant not all = if(ISFILTERED('Item'[Brand]),DISTINCTCOUNT('Item'[Brand]),0)

 

refer : https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak, I have tried it, it seems a good solution :), quick question please, do you know why i got 0 if i selected "Select All" in the filter? and how to return the number of all distnict values if "Select all" is choosen?

@amitchandak & @Pragati11, to make the question more clear:

I want to check if Select All from a slicer is chooen?

MohannadSh1996_0-1594306691807.png

 

Anonymous
Not applicable

Hi @MohannadSh1996 ,

You can create a measure as below:

Count of selected items =
VAR _selClient =
    ALLSELECTED ( 'Table'[Client] )
RETURN
    CALCULATE ( COUNT ( 'Table'[Client] ), 'Table'[Client] IN _selClient )

slicer selected items.JPG

You can also refer the contents in the following links to get it.

Get selected or multiple values from slicers using DAX

How to count how many items are selected on a Slicer

Best Regards

Rena

Pragati11
Super User
Super User

Hi @MohannadSh1996 ,

 

I didn't understand your question. Can you explain in detail with some screesnhots or sample data? Try sharing your DAX as well.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.