Forum Discussion
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 possible?
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
6 Replies
- amitchandakSuper User
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- Fali324Helper II
yes its a numerical parm
I've created the measures you've mentioned above. how do I now filter the table?- amitchandakSuper User
Fali324 , You can filter calculated tables. You can only filter measures. Like one I have give in example
Other examples are
TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448
- Rathish_SakthiRegular Visitor
Hi , Yes it is possible to create a dynamic table using parameters.
To help further with your question can you attach a picture or define what exactly needs to be done. However On the overview you can create a measure to check whether the table value falls within the upperbound and lowerbound values and return "1" or "0" based on the condition and once the measure is created , you can add the measure to filter section of your visual. If you want further clarification please feel free.
Thanks. - govind_021Super User
Hi Fali324
Please try following codeFilterMeasure =
VAR SelectedValue = SELECTEDVALUE( 'ParameterTable'[ParameterValue] )
VAR LowerBound = SelectedValue * 0.9
VAR UpperBound = SelectedValue * 1.1RETURN
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.