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

Please need help making a Dynamic Line in my line Chart

I have a line chart showing accumulated exports by year for different countries. The line chart has a constant line that shows the projeted total we are trying to meet. Here is a picture of an example below. I would like to have that when I select another country the Constant line moves accordingly. I know how to do this with adding another value the thing is I have a legend in my chart and you cant have two values with a legend in Power Bi.Bi test.PNG

 
2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,
 
The value of constant line is determined by a constant value and cannot be changed by the slicer.
I would suggest you create a measure and then drag the measure to the chart.
Try DAX like this:
Measure = SELECTEDVALUE ( sheet1[value] )
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for your reply. Here is my project now are you saying I will be able to drag another measure to the values section. It wont let me add another one when I have a legend 

 

 

 

Bitest2.PNG

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.