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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HarryR
Regular Visitor

Filter Minimum Y-Axis Based on Slicer

Hi all, 

 

This has been something I've been trying to do for some time, and thought I might be able to solve with Field Parameters, but alas I've hit another roadblock.

I'm trying to add a slicer to a chart that would remove all items have less than a specified number of items determined by a slicer. So basically so if the user had filtered the chart to see categories with above 50 items, only A, C, F & G would appear from the below table.

 

CategoryNo. of Items
A59
B26
C85
D23
E19
F65
G53

 

Any ideas on how to achieve this at all?

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Create a numeric field parameter slicer.

Then try use something similar to the following DAX as the measure:

No. Items = 
var items = CALCULATE(COUNT([Items]), ALLEXCEPT(Table, [Category])
var minItems = SELECTEDVALUE([Parameter Value])
return IF(items > minItems, items, BLANK())

 

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

Create a numeric field parameter slicer.

Then try use something similar to the following DAX as the measure:

No. Items = 
var items = CALCULATE(COUNT([Items]), ALLEXCEPT(Table, [Category])
var minItems = SELECTEDVALUE([Parameter Value])
return IF(items > minItems, items, BLANK())

 

Thanks man, this worked!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.