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
MAJ_1205
Regular Visitor

Measure filtred dynamically based on slicer

Hello,
I am trying to dynamically filter on a measure based on different slicer selection, for example, when I select audio from category selection
The measure should be filtered on value>1000
And when I select a cell phone, value>5000

This is my trial: 

 

Sales FTD =
VAR Filtered_Audio = IF( [Sales Amount] > 1000, [Sales Amount], 0)
VAR Filtered_Cell = IF( [Sales Amount] > 5000, [Sales Amount], 0)
VAR _selected_category = SELECTEDVALUE('Product Category'[Category])
VAR Result = If(_selected_category = "Audio", Filtered_Audio,
If(_selected_category = "Cell phones", Filtered_Cell,
0
))
Return
Filtered_Cell

 

 

 

 

The problem with selected value always returns blank
Any help is appreciated

1 ACCEPTED SOLUTION
lazurens2
Frequent Visitor

Maybe this : 

Sales FTD = 
VAR Filtered_Slicer1 = IF( [Value Measure] > 200, [Value Measure], 0)
VAR Filtered_Slicer2 = IF( [Value Measure] > 0.8, [Value Measure], 0)
VAR _Selected_Slicer = SELECTEDVALUE('FieldToSlice'[Field])
VAR _Result = If(_Selected_Slicer = "Value1", Filtered_Slicer1,
                If(_selected_category = "Value", Filtered_Slicer2,
                0
                ))
Return
    _Result

 

 

View solution in original post

1 REPLY 1
lazurens2
Frequent Visitor

Maybe this : 

Sales FTD = 
VAR Filtered_Slicer1 = IF( [Value Measure] > 200, [Value Measure], 0)
VAR Filtered_Slicer2 = IF( [Value Measure] > 0.8, [Value Measure], 0)
VAR _Selected_Slicer = SELECTEDVALUE('FieldToSlice'[Field])
VAR _Result = If(_Selected_Slicer = "Value1", Filtered_Slicer1,
                If(_selected_category = "Value", Filtered_Slicer2,
                0
                ))
Return
    _Result

 

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.