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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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] ) ))

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] ) ))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.