Forum Discussion

Fali324's avatar
Fali324
Helper II
1 year ago
Solved

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?

6 Replies

  • Hi Fali324 

     

    If you're trying to create a calculated table that udpates based on parameter selections, that  is not possible. Calculated tables update only upon refresh, when the formula itself has or the referenced tables have been modified. It isn't aware of any slicer selection.

     

    • Fali324's avatar
      Fali324
      Helper II

      yes its a numerical parm



      I've created the measures you've mentioned above. how do I now filter the table?



      • amitchandak's avatar
        amitchandak
        Super 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

  • 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.

     

  • 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.