Reputation: 19
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 measure reads
Actuals = SELECTEDVALUE('Actual Hours'[Average Actual FTE])
EDIT
Updated Line Chart New Measure Code
Upvotes: 1
Views: 1439
Reputation: 349
To continue the line you should fill blanks for future dates like this:
Actuals =
VAR _LastDate =
CALCULATE(
MAX('Table'[month]),
ALL('Table'),
NOT(ISBLANK('Table'[value]))
)
VAR _Value =
CALCULATE(
SUM('Table'[value]),
'Table'[month] = _LastDate
)
RETURN
SWITCH(
SUM('Table'[value]),
BLANK(), _Value,
SUM('Table'[value])
)
_LastDate defines last date with non-blank value and _Value gets value for this date. Inside RETURN we fill blanks with _Value and do nothing to non-blanks.
On my dummy data it looks like:
Upvotes: 0