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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

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
v-tangjie-msft
Community Support
Community Support

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 @v-tangjie-msft,

 

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!

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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