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
sindrekb
Frequent Visitor

Measure to filter column values >=1

I have a table showing inventory across three main categories all in separate columns. 

- Allocated to Demand

- Allocated to Saftety Stock

- Not Allocated

 

How can I create a measure for these categories, where if "Allocated to Demand" is selected, I only see the Items Allocated to Demand with quantities greater to or equal to 1? 

I note that due to the complexity of the structure in the actual report, I'd would ver much prefer to solve this with a measure in DAX rather than through Pivot/Unpivot in PowerQuery. 

 

Thank you. 

 

sindrekb_0-1719990712494.png

 

1 ACCEPTED SOLUTION

@sindrekb 

pls try this

 

Measure = switch(true(),SELECTEDVALUE('Table (2)'[column])="Allocated to Demand" && sum('Table'[Allocated to Demand Stock])>=1,1,SELECTEDVALUE('Table (2)'[column])="Allocated to Safety Stock"&&sum('Table'[Allocated to Safety Stock])>=1,1,SELECTEDVALUE('Table (2)'[column])="Not Allocated"&&sum('Table'[Not Allocated])>=1,1)
 
pls see the attachment below




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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
sindrekb
Frequent Visitor

This works for the "Allocated to Demand" structure, but if possible, how can all categories be structured in one singular slicer, where if I select "Allocated to Demand", the table will show all items in Column "Allocated to Demand", greater than or equal to 1. And the same for "Allocated to Safety Stock" and "Not Allocated".

 

The snip below examplifies this visually, but note that this solution does not work in practice as the model I'm working with is quite complex. 

 

sindrekb_0-1719993330859.png

 

@sindrekb 

pls try this

 

Measure = switch(true(),SELECTEDVALUE('Table (2)'[column])="Allocated to Demand" && sum('Table'[Allocated to Demand Stock])>=1,1,SELECTEDVALUE('Table (2)'[column])="Allocated to Safety Stock"&&sum('Table'[Allocated to Safety Stock])>=1,1,SELECTEDVALUE('Table (2)'[column])="Not Allocated"&&sum('Table'[Not Allocated])>=1,1)
 
pls see the attachment below




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

Proud to be a Super User!




ryan_mayu
Super User
Super User

@sindrekb 

you can try to create a measure

 

Measure = if(sum('Table'[Allocated to Demand])>=1,1,0)
 
and add this measure to visual filter and set to 1
11.PNG




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

Proud to be a Super User!




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.

Top Solution Authors