Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
SK09
Frequent Visitor

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

SK09_0-1671650200990.png

 

 

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?

 

SK09_1-1671650201000.png

 

 

Thank you in advance.

Sai

6 REPLIES 6
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

vcgaomsft_0-1671697247939.png

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

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.

 

SK09_1-1671719514732.png

 

SK09_2-1671719559375.pngSK09_3-1671719688642.png

 

 

Thank you in advance.

Sai

 

Anonymous
Not applicable

Hi @SK09 ,

 

My mistake, I forgot to create the relationship. After creating the relationship, it should output the correct result.

vcgaomsft_0-1671759646692.png

vcgaomsft_1-1671759746161.png

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

Hi Gao, 

 

I cannot create a direct relationship Between Table and Calender table.

Attaching the relationship diagram for your reference (Red box indicates inactive relationships and blue box indicates active relationships ) along with tha sample data.

SK09_1-1671789436088.png

 

 

AdmData.

ID.App     Date.Intake    sno              Date.App    Brand       Join

30908/10/2018Q100030411/07/2018BSBIBSBI|309
6123103/10/2022Q100030405/08/2022BSBIBSBI|61231

 

Table Data
Brand   sno                app id  nationality  Final.Date   EUR        CAD   Paid       Join          Sum

BSBIQ1000304309India07-Mar-19150001500BSBI|3091500
BSBIQ1000304309India02-May-19200002000BSBI|3093500
BSBIQ1000304309India13-May-191000100BSBI|3093600
BSBIQ1000304309India18-Nov-19-1000-100BSBI|3093500
BSBIQ1000304309India22-Nov-19000BSBI|3093500
BSBIQ100030461231India01-Sep-22100001000BSBI|612311000
BSBIQ100030461231India02-Sep-225000500BSBI|612311500
BSBIQ100030461231India10-Oct-225000500BSBI|612312000
BSBIQ10007519090Pak07-Mar-195000500BSBI|9090500
BSBIQ10007519090Pak02-May-195000500BSBI|90901000
Anonymous
Not applicable

Hi @SK09 ,

 

Please try:

Measure = 
VAR _parameter = MAX('Parameter'[Parameter])
VAR _min_date = MIN('Calendar'[Date])
VAR _max_date = MAX('Calendar'[Date])
VAR _count = 
COUNTROWS(
    FILTER(
        'Table',
        'Table'[Sum] >= _parameter
        && 'Table'[Paid.Date] >= _min_date
        && 'Table'[Paid.Date] <= _max_date
    )
)
VAR _result =
IF(_count>=1,"Yes","No")
RETURN
_result

vcgaomsft_0-1672727334958.png

vcgaomsft_1-1672727354684.png

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

 

sturlaws
Resident Rockstar
Resident Rockstar

Hi, @SK09,

 

not sure what you are trying to achieve, I made a simple sample report, is this what you are after?


Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

 

How to Get Your Question Answered Quickly

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors