Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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
Role | ID | Date | Actual Hours | Average Actual FTE |
Role1 | Pro4 | 01-Mar-22 | 143 | 0.89 |
Role1 | Pro4 | 01-Apr-22 | 98 | 0.61 |
Role1 | Pro4 | 01-May-22 | 166 | 1.04 |
Role1 | Pro4 | 01-Jun-22 | 177 | 1.11 |
Role2 | Pro4 | 01-Mar-22 | 200 | 1.25 |
Role2 | Pro4 | 01-Apr-22 | 300 | 1.88 |
Role2 | Pro4 | 01-May-22 | 143 | 0.89 |
Role2 | Pro4 | 01-Jun-22 | 120 | 0.75 |
Role3 | Pro4 | 01-Mar-22 | 133 | 0.83 |
Role3 | Pro4 | 01-Apr-22 | 260 | 1.63 |
Role3 | Pro4 | 01-May-22 | 213 | 1.33 |
Role3 | Pro4 | 01-Jun-22 | 340 | 2.13 |
Role4 | Pro4 | 01-Mar-22 | 123 | 0.77 |
Role4 | Pro4 | 01-Apr-22 | 120 | 0.75 |
Role4 | Pro4 | 01-May-22 | 260 | 1.63 |
Role4 | Pro4 | 01-Jun-22 | 160 | 1.00 |
Current measure reads
Actuals = SELECTEDVALUE('Actual Hours'[Average Actual FTE])
Thank you
Solved! Go to Solution.
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:
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.
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:
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.
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
Proud to be a Super User!
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |