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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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
Top Kudoed Authors