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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
CuriousGuy001
Helper I
Helper I

Making Slicer on Multiple Categories with Counts

Hi Everyone,

 

I am trying to create a slicer with four selected options "Fruit" , "Vegetable", "Seafood", "Meat" by Count of how many was sold by our Sales Representatives. I got Product Category on row, and Sales Rep. on column. If I select Fruit it will show how many on count was sold by Jack as an example, Jack sold Apple and will count 1 and not counting 0 or empty cells.

 

Excel - Sample.png

Sample.png

4 REPLIES 4
xifeng_L
Super User
Super User

Hi @CuriousGuy001 ,

 

First, you need to convert the data to a one-dimensional table.

 

xifeng_L_2-1716607084277.png

 

Then, you can try below measure.

 

xifeng_L_0-1716606990238.png

 

 

Measure = CALCULATE(COUNT('Table'[Value]), NOT 'Table'[Value] IN {"0",BLANK()})

 

 

 

Demo - Making Slicer on Multiple Categories with Counts.pbix

 

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

Hi Xifeng,

 

I like this method but it didn't work cause the are duplicate of product category, making more revenues. Thanks!

Sorry, I didn't quite understand your question. If my previous demo doesn't match your expected result, you can tell me the correct result.

Hi xifeng,

 

Don't feel be sorry! so I have 385 data entry in the table, if I use that one dimension (Unpivot Other Column option) will make more data entry in the table, I will get 1540 data entry. I am trying to make a slicer for fruit, vegetable, seafood, meat that can give me a count of our sales rep that has been sold. The result will have to work with the 385 data entry I have, and the one dimensional option won't work. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.