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
AutoJL
Helper II
Helper II

Choosing between count and distinct count in visual with slicer

Hi Fellow Community!

I need some assistance with a "seemingly easy" task. I have some visuals built in a report that use one column of my dataset. This column contains ID values which can be duplicates. I would like to be able to use the visual with the normal count or with the distinct count toggling between them with the help of a slicer (Similarly to what field parameters do).

 

Any ideas on how to achieve this?

Many thanks!

1 ACCEPTED SOLUTION
AutoJL
Helper II
Helper II

Hello!

 

Finally i was giving this some tries and realized I was overthinking it. There is a very easy solution! The basic idea is not to use the default columns from the dataset and then selecting in the visualization Field panel but rather using DAX measures:

I have created 2 measures with DAX: the count and the distinctcount of the column that I wanted. Then with those  have created a field parameter with which I can build a slicer and use in the any visual.

 

Many thanks and hope it helps!

View solution in original post

1 REPLY 1
AutoJL
Helper II
Helper II

Hello!

 

Finally i was giving this some tries and realized I was overthinking it. There is a very easy solution! The basic idea is not to use the default columns from the dataset and then selecting in the visualization Field panel but rather using DAX measures:

I have created 2 measures with DAX: the count and the distinctcount of the column that I wanted. Then with those  have created a field parameter with which I can build a slicer and use in the any visual.

 

Many thanks and hope it helps!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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