Forum Discussion

SK09's avatar
SK09
Frequent Visitor
3 years ago

Dynamic Targets Using Parameters

Hi

 

I have request from a user’s that he want to enter the target value into a parameter and the target value should be compared with the data and the output on the visual should show if the target is reached or not with in the selected date range

 

Below is the transaction data

 

 

in the below visuals if the users enter the target value inside the parameter the Depo_Check column should check if the target amount is reached or not for the selected date ranges provided in the date slicer.

 

Can anyone help me on creating a measure which allow me to get the desired output?

 

 

 

Thank you in advance.

Sai

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SK09 ,

     

    Please try:

    Measure = 
    VAR _parameter = MAX('Parameter'[Parameter])
    VAR _count = 
    COUNTROWS(
        FILTER(
            'Table',
            'Table'[Sum]>=_parameter
        )
    )
    VAR _result =
    IF(_count>=1,"Yes","No")
    RETURN
    _result

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

    • SK09's avatar
      SK09
      Frequent Visitor

      Hi Gao,

       

      Thak you for your response.

       

      I have tried the measure which you shared.

       

      But my issue is that we have a relationship between the Table and Calender table and when i select the date range in the slicer as 01/May/2019 to 05/May/2019 and Pass a parameter values as 2000 (As shown in the screenshot below) 309 Appid ahoud return the value as "Yes" as it has a payment of 2000 on 02/May/2019.

      For the same date range if enter the parameter value as 2100 or more the measure value should return "No" as it has a payment of only 2000 between that date range.


      Attaching the screenshot for your reference.

       

       

       

       

      Thank you in advance.

      Sai