Forum Discussion
Fali324
1 year agoHelper II
Dynamic Table based on Parameter
Hi I have created a parameter which will select a value between 1m - 100m I then have two measures Lowerbound and Upperbound. I then want to use this range to filter a table Is this possi...
- 1 year ago
Fali324 , Hope you created numeric parameter
then you will two measure
Min = minx(allselected(param), Param[Value])max = maxx(allselected(param), Param[Value])
Use in measure =
Countrows(filter(Table, Table[Value] >= min && Table[Value] <= Max ) )
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
govind_021
1 year agoSuper User
Hi Fali324
Please try following code
FilterMeasure =
VAR SelectedValue = SELECTEDVALUE( 'ParameterTable'[ParameterValue] )
VAR LowerBound = SelectedValue * 0.9
VAR UpperBound = SelectedValue * 1.1
RETURN
IF(
SELECTEDVALUE( Sales[SalesAmount] ) >= LowerBound &&
SELECTEDVALUE( Sales[SalesAmount] ) <= UpperBound,
1,
0
)
then apply this measure as a filter in your table visual and set it to 1.