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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
KarenFingerhut
Post Patron
Post Patron

Add a Linear line from top left to bottom right in Line Chart

Hi there

 

Can somsone please help with the below 

 

I'm trying to add a line in to a line chart where basically shows the max starting position and the end position in a straight line. I have added a screenshot below and drawn the line in. I have tried using the in-built funactionalities of formating the chart  but I can't seem to find anything that will work.

 

Can someone please help

KarenFingerhut_0-1697538657786.png

 

Thank you

Karen

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @KarenFingerhut 

 

For this add a new measure with the following syntax:

Max min line =
IF (
    MAX ( 'Table'[Date] ) = MAXX ( ALL ( 'Table'[Date] ), 'Table'[Date] )
        || MIN ( 'Table'[Date] ) = MINX ( ALL ( 'Table'[Date] ), 'Table'[Date] ),
    SUM ( 'Table'[Value] )
)

 

Then add this as a secondary measure on your chart

MFelix_0-1697567765635.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi @KarenFingerhut

 

Replace the ALL on the measure by ALLSELECTED everything else keep as is. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @KarenFingerhut 

 

For this add a new measure with the following syntax:

Max min line =
IF (
    MAX ( 'Table'[Date] ) = MAXX ( ALL ( 'Table'[Date] ), 'Table'[Date] )
        || MIN ( 'Table'[Date] ) = MINX ( ALL ( 'Table'[Date] ), 'Table'[Date] ),
    SUM ( 'Table'[Value] )
)

 

Then add this as a secondary measure on your chart

MFelix_0-1697567765635.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



HI @MFelix 

Thanks very much for getting back to me. It works brilliantly but as soon as I start filtering on dates it stops working. Eaxmples below.

 

Before changing date range 

KarenFingerhut_0-1697614638035.png

 

After date range change. You can see I just get a dot on the far right

KarenFingerhut_1-1697614694402.png

 

Can you please advise if this is possible to fix, so its interactive with whatever date range you select

 

Appreciate all your help

 

Kind regards

Karen

Hi @KarenFingerhut

 

Replace the ALL on the measure by ALLSELECTED everything else keep as is. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



HI @MFelix 

Brilliant that worked a treat. I did try ALLSELECTED but I had the date in this format 

Changes[opened_at_value].[Date]  instead of this Changes[opened_at_value] , which then worked after I received your advice.

Thanks for all your help 🙂

Have a great day

Kind regards

Karen

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.