The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi,
I have a table with two columns, index and values (ranging from 1 to 100). I want to filter the table based on user inputs, 'input value' and 'tolerance' (in percentage). For example, if user inputs '50' as 'input value', and '10' as tolerance, then I want to filter the table with value ranging between 45 and 55. I created 'What-if' parameters for both input value and tolerance, and created measures 'Min Value' and 'Max Value' to define the limits for filtering. How do I use these measures to filter the data ('Display Table'). I can use a slicer to filter the table ('Value Filter'), but I want to also filter the data based on input value and tolerance.
Thank you,
Amit.
Solved! Go to Solution.
Hi @Anonymous ,
Try to do like this.
1. create a measure.
Filter =
IF(
MAX(Sheet8[Index]) >= [Min] && MAX(Sheet8[Index]) <= [Max],
1,0
)
2. Add the measure to the "Filters on this visual".
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try to do like this.
1. create a measure.
Filter =
IF(
MAX(Sheet8[Index]) >= [Min] && MAX(Sheet8[Index]) <= [Max],
1,0
)
2. Add the measure to the "Filters on this visual".
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Lionel Chen,
This solution works! I used the new filter and display table with rows having '1' as filtered value. My next step is to figure out how to not display the filter column or make it invisible.
@Anonymous , You can create a new measure like below. Main thing is values /force a context to filter
new measure =
var _min = minx(allselected(slicer), slicer[value])
var _max = maxx(allselected(slicer), slicer[value])
return
calculate(sumx(filter(values(Table[Index]) , [measure] >=_min && [measure] <=_max),[measure]))
Thank you for the quick response! I do not understand what the code is trying to achieve. Here is the modified code based on your input:
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
157 | |
106 | |
96 | |
83 | |
75 |
User | Count |
---|---|
153 | |
137 | |
131 | |
81 | |
61 |