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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to Create Continuous Line Chart at End of Position

I have a line chart which the dark blue line data point ends halfway through the chart, as no future data is yet available.

Is there a way to continue the line throughout the rest of the months on the date X Axis as a straight line with its current end position?

 

Current table reads 

RoleIDDateActual HoursAverage Actual FTE
Role1Pro401-Mar-221430.89
Role1Pro401-Apr-22980.61
Role1Pro401-May-221661.04
Role1Pro401-Jun-221771.11
Role2Pro401-Mar-222001.25
Role2Pro401-Apr-223001.88
Role2Pro401-May-221430.89
Role2Pro401-Jun-221200.75
Role3Pro401-Mar-221330.83
Role3Pro401-Apr-222601.63
Role3Pro401-May-222131.33
Role3Pro401-Jun-223402.13
Role4Pro401-Mar-221230.77
Role4Pro401-Apr-221200.75
Role4Pro401-May-222601.63
Role4Pro401-Jun-221601.00

 

Current measure reads 

 

Actuals = SELECTEDVALUE('Actual Hours'[Average Actual FTE])​

 

line.PNG

 Thank you

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need create a  calendar table first. Create a relationship between actual table and calendar table depend on date.

Then create a measure like the following:

measure =
VAR _LASTDATE =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
VAR _LASTVALUE =
    CALCULATE (
        MAX ( 'Table'[Average Actual FTE] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Date] = _LASTDATE )
    )
RETURN
    IF (
        ISBLANK ( MAX ( 'Table'[Average Actual FTE] ) ),
        IF ( MONTH ( MAX ( 'CALENDAR'[Date] ) ) >= MONTH ( _LASTDATE ), _LASTVALUE ),
        MAX ( 'Table'[Average Actual FTE] )
    )

 

Result:

vchenwuzmsft_0-1657008368360.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need create a  calendar table first. Create a relationship between actual table and calendar table depend on date.

Then create a measure like the following:

measure =
VAR _LASTDATE =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
VAR _LASTVALUE =
    CALCULATE (
        MAX ( 'Table'[Average Actual FTE] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Date] = _LASTDATE )
    )
RETURN
    IF (
        ISBLANK ( MAX ( 'Table'[Average Actual FTE] ) ),
        IF ( MONTH ( MAX ( 'CALENDAR'[Date] ) ) >= MONTH ( _LASTDATE ), _LASTVALUE ),
        MAX ( 'Table'[Average Actual FTE] )
    )

 

Result:

vchenwuzmsft_0-1657008368360.png

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Nathaniel_C
Community Champion
Community Champion

Hi @Anonymous ,

Look at this solution. You would need to add a table with the last value.

https://community.powerbi.com/t5/Desktop/Line-Graph-Actuals-extended-by-Forecast/td-p/1137241 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 





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

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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