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! Request now

Reply
Anonymous
Not applicable

How to change target line

Hi Power BI Community,

 

Good day. I would like to seek help on how to change the target line depending on the country's target. Is there a way to change the target line based on that? Currently, I am using constant line but I need changing target. Hope you can help me. 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , If you are using an X-axis/Y-axis constant line in the analytics pane, there is an option of fx(under the line in the new pane) , You can have a measure which can change base on selected country and use that there.

 

 

If country is part of the visual you can have a measure in clustered bar and line visual  as line

 

measure = calculate(sum(Table[Target]), filter(Allselected(Table), Table[Country] = max(Table[Country] ) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

VahidDM
Super User
Super User

Hi @Anonymous 

 

Create a measure and use that in the line value of the Constant line section:
You need to use the Conditional formatting fx:

VahidDM_0-1652325232990.png

 

In the Value - Apply setting to, select your measure

VahidDM_1-1652325308101.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you, @amitchandak and @VahidDM ! It's working now. 🙂

 

Anonymous
Not applicable

Hello. I am trying the formula, is this correct? 

Target = Calculate(Sum(AppTarget[Target]), Filter(Allselected('SC_On Time Approval'), 'SC_On Time Approval'[Country] = Max('AppTarget'[Country] ) ))
VahidDM
Super User
Super User

Hi @Anonymous 

 

Create a measure and use that in the line value of the Constant line section:
You need to use the Conditional formatting fx:

VahidDM_0-1652325232990.png

 

In the Value - Apply setting to, select your measure

VahidDM_1-1652325308101.png

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

 

 

amitchandak
Super User
Super User

@Anonymous , If you are using an X-axis/Y-axis constant line in the analytics pane, there is an option of fx(under the line in the new pane) , You can have a measure which can change base on selected country and use that there.

 

 

If country is part of the visual you can have a measure in clustered bar and line visual  as line

 

measure = calculate(sum(Table[Target]), filter(Allselected(Table), Table[Country] = max(Table[Country] ) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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