Forum Discussion

rsbin's avatar
rsbin
Community Champion
2 years ago
Solved

Numeric Range Parameters

Hello Folks,

Using Parameters for the first time and struggling with some logic:

I have a simple Numeric Range Parameter which represents "Driver Wait Time (s)"  - from 0 - 180 incremented by 1.

 

QueueTimeThreshold(sec) = GENERATESERIES(0, 180, 1)

 

I have a Fact Table with Driver Transactions ranging from 0 to 4000 seconds.

The logic I would like to deploy is when the User selects a single value from the Parameter, i.e. 20, the Table should filter all Driver Transactions > Parameter Value.  In other words, display "Outlier" records only.

I've read threads regarding the limitations of Numeric Parameters, but have twisted myself into a knot trying to determine how best to make this work. Sample Data:

BatchJobID Overall Driver Wait
978865 12
978866 18
978867 9
978868 9
978869 15
978870 30
978871 14
978872 97

Thanks much in advance and Best Regards,

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi rsbin 

    Based on your description, you can refer to the following solution.

    Sampple data 

    The paramater table is the same as you privided.

    Create a measure.

     

     

    MEASURE =
    CALCULATE (
        SUM ( 'Table'[Overall Driver Wait] ),
        'Table'[Overall Driver Wait]
            > SELECTEDVALUE ( 'QueueTimeThreshold(sec)'[Parameter] )
    )
    )

     

     

    Then put the measure to the visual.

    Output

     

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rsbin 

    Based on your description, you can refer to the following solution.

    Sampple data 

    The paramater table is the same as you privided.

    Create a measure.

     

     

    MEASURE =
    CALCULATE (
        SUM ( 'Table'[Overall Driver Wait] ),
        'Table'[Overall Driver Wait]
            > SELECTEDVALUE ( 'QueueTimeThreshold(sec)'[Parameter] )
    )
    )

     

     

    Then put the measure to the visual.

    Output

     

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • rsbin's avatar
      rsbin
      Community Champion

      Anonymous , Ashish_Mathur 

      Apologies for the delayed response.  I got dragged into another project.

      Thank you both for providing the solution.  Ashish, Driver Wait is actually a column in my Fact Table so I simply went with Yolo's solution.  But understand both solutions are driving at the same thing and now understand the logic.

      Kind Regards to you both,

  • Hi,

    Assuming overall driver wait is a measure that you have written, write this measure and filter with the criteria of TRUE

    Test = [Overall driver wait]>[Parameter value]

    Hope this helps.