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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors