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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Egon
Helper I
Helper I

Displaying a count in the value of a slicer

Hello

 

I am looking for a way to display a count value on a slicer. 

In the picture the slicer is for filtering "type". In the picture, the # in () is the count of each type.

 

I am new at DAX, so this may be simple and I am simply not getting it

 

thank you

 

Slicer.png

 

4 REPLIES 4
Wilson_
Super User
Super User

Hello Egon,

 

Knowing nothing else about your dataset, I think this should be a two-step process for each of your slicers:

 

  • Create a measure like the below to count how many items you have that fall under Roman:
Slicer Title = 
"Roman (" & 
CALCULATE ( 
    COUNT ( 'Table1'[Category] ),
    'Table1'[Category] = "Roman"
)
& ")"
  •  In your slicer, go to the below setting to set your new measure as the "conditional formatting" (ie: variable) for the slicer header.

Wilson__0-1680744825754.png

 

Please let me know if that works or if you were looking for something different. 😄


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for the reply Wilson

 

I am working on it however based on your instructions, the count would end up in the header. The property I am trying to alter is the "Value". So in the slicer, there are 6 categories of coins which I have denoted as "types" in my data table, Roman being one of them.

 

Is there a way (and there may not be) to have the count of each type in the slicer next to the "type" on each of the 6 slicer "bottuns". This would show up on the slicer button itself, not in the header (see attached pic). Value does not seem to be a parameter you can do conditional formatting on, so this may not be possiblePicture1.png

 

 

thanks

 

Egon

Hi Egon,

 

Got it, I misinterpreted your original image; I thought those were individual slicers. Looks like you have one slicer in horizontal view. Unfortunately, I don't believe you can alter the slicer selections. Those are the values in the column you're slicing on. The closest thing I can think of would be having a card visual under each slicer with a count, but even that clunky solution only works if the slicer values remain static.

 

Always possible I'm missing something though!


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Wilson

 

Yeah I also think it isnt doable. I thank you for the input. Its valuable since I am still learning the platform.

 

Egon

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors