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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jwang19
Frequent Visitor

Count how many selected options - multiple slicers in one page

Hi experts,

 

I'd like to calculate how many selected customer in the customer slicer.

 

Here's my current measure and demo file attached: 

Count of Selected Customer = CALCULATE( DISTINCTCOUNT(Customer_Visit_Plan[Customer]), ALLEXCEPT(Customer_Visit_Plan,Customer_Visit_Plan[Customer]))
 

It works when all other slicers aren't selected, but if we choose other slicers, the measure shows incorrect number as below.

Ex. It should be 2 instead of 1 in this case.

jwang19_0-1691718684348.png

 

Demo File 

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jwang19 ,

 

Based on your data, there is only one line of data that also satisfies Manager=A , Customer=xxxxx /zzzzz , MeetingDate=4/1/2023, due to the fact that measure is dynamic value that change based on context. So if you want to show only the number of Customer selected in the slicer, you can create a card visual object or place only this metric in the table and the other slicers don't affect the measure, so you also need to edit the interaction.

vtangjiemsft_0-1691999181775.png

 

vtangjiemsft_1-1691999214753.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jwang19 ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create a measure. 

Count of Selected Customer = CALCULATE(DISTINCTCOUNT('Customer_Visit_Plan'[Customer]),ALLSELECTED('Customer_Visit_Plan'[Customer]))

(2) Then the result is as follows.

vtangjiemsft_0-1691977270183.png

 

Unfortunately the pbix you provided I do not have access to. If this doesn't help, please provide the pbix file that can be accessed. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. s

Hi @Anonymous,

 

Thanks for the response, but it's not working in my file.

jwang19_1-1691978175907.png

 

 

Please see attached my access link: https://joycewang1003.notion.site/Demo-Questions-54a2d9b721a74bba936fc968217e31a7?pvs=4

If it's still not working, my demo table is like this without any relationship:

jwang19_0-1691978064370.png

 

Thanks again for your help!

Anonymous
Not applicable

Hi @jwang19 ,

 

Based on your data, there is only one line of data that also satisfies Manager=A , Customer=xxxxx /zzzzz , MeetingDate=4/1/2023, due to the fact that measure is dynamic value that change based on context. So if you want to show only the number of Customer selected in the slicer, you can create a card visual object or place only this metric in the table and the other slicers don't affect the measure, so you also need to edit the interaction.

vtangjiemsft_0-1691999181775.png

 

vtangjiemsft_1-1691999214753.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

Thanks, perhaps it's the correct solution for this case.


Unfortunately it couldn't fix my question to calculate the selected costumers considering all context, so I reopen another new question to describe the whole report I'd like to make.

Pls let me know if you have any ideas on it: Blank option in Single-select slicer with other op... - Microsoft Fabric Community

Thanks!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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