This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I want to filter one table based on mulitple thresholds. See examples below:
Data table:
Expense amount Category
250 Airline
500 Airline
150 Airline
300 Entertainment
1000 Entertainment
Right now i have one parameter, that for example, i can enter in 200 in a slicer, and the table will update to show me expenses that are over $200. Filtered view below:
Expense amount Category
250 Airline
500 Airline
300 Entertainment
1000 Entertainment
What i want to be able to do is to have thresholds, that the user can update directly through a slicer on the page, for each expense category.
For example, I want to only show airline expenses over $200, and entertainment expenses only over $500. Below is what the result would be:
Expense amount Category
250 Airline
500 Airline
1000 Entertainment
Does anyone know how to do this? Any help is appreciated. Thank you!
Solved! Go to Solution.
Hi, @daosborne
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Data:
AirExpense1(a calculated table):
AirExpense1 = GENERATESERIES(1,MAX(Data[Expense amount]),1)
EntertainmentExpense2(a calculated table):
EntertainmentExpense2 = GENERATESERIES(1,MAX(Data[Expense amount]),1)
You may create a measure like below.
Visual Control =
var _category = SELECTEDVALUE(Data[Category])
var _expense = SELECTEDVALUE(Data[Expense amount])
return
IF(
ISFILTERED(Category[Category]),
IF(
HASONEVALUE(Category[Category]),
IF(
SELECTEDVALUE(Category[Category]) = "Airline"&&HASONEVALUE(AirExpense1[Value])&&_category="Airline"&&_expense>=SELECTEDVALUE(AirExpense1[Value]),
1,
IF(
SELECTEDVALUE(Category[Category])="Entertainment"&&HASONEVALUE(EntertainmentExpense2[Value])&&_category="Entertainment"&&_expense>=SELECTEDVALUE(EntertainmentExpense2[Value]),
1,0
)
),
IF(
OR(
_category="Airline"&&_expense>=SELECTEDVALUE(AirExpense1[Value]),
_category="Entertainment"&&_expense>=SELECTEDVALUE(EntertainmentExpense2[Value])
)&&SELECTEDVALUE(AirExpense1[Value])<>BLANK()&&SELECTEDVALUE(EntertainmentExpense2[Value])<>BLANK(),
1,0
)
),
1
)
Finally you may put the measure 'Visual control' in the corresponding visual level filter to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @daosborne
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Data:
AirExpense1(a calculated table):
AirExpense1 = GENERATESERIES(1,MAX(Data[Expense amount]),1)
EntertainmentExpense2(a calculated table):
EntertainmentExpense2 = GENERATESERIES(1,MAX(Data[Expense amount]),1)
You may create a measure like below.
Visual Control =
var _category = SELECTEDVALUE(Data[Category])
var _expense = SELECTEDVALUE(Data[Expense amount])
return
IF(
ISFILTERED(Category[Category]),
IF(
HASONEVALUE(Category[Category]),
IF(
SELECTEDVALUE(Category[Category]) = "Airline"&&HASONEVALUE(AirExpense1[Value])&&_category="Airline"&&_expense>=SELECTEDVALUE(AirExpense1[Value]),
1,
IF(
SELECTEDVALUE(Category[Category])="Entertainment"&&HASONEVALUE(EntertainmentExpense2[Value])&&_category="Entertainment"&&_expense>=SELECTEDVALUE(EntertainmentExpense2[Value]),
1,0
)
),
IF(
OR(
_category="Airline"&&_expense>=SELECTEDVALUE(AirExpense1[Value]),
_category="Entertainment"&&_expense>=SELECTEDVALUE(EntertainmentExpense2[Value])
)&&SELECTEDVALUE(AirExpense1[Value])<>BLANK()&&SELECTEDVALUE(EntertainmentExpense2[Value])<>BLANK(),
1,0
)
),
1
)
Finally you may put the measure 'Visual control' in the corresponding visual level filter to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@daosborne , what if parameter should help you
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Also, refer Segmentation
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 56 | |
| 31 | |
| 26 | |
| 23 |