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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors