1

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])​

Chart

Dataset

EDIT

Updated Line Chart New Measure Code

Smooth
  • 19
  • 4

1 Answers1

0

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: enter image description here

Darkitechtor
  • 355
  • 1
  • 2
  • 12
  • This is great! however, it rolls up figures into totals (See new screenshots in original post) i also have a separate date and forecast table which is linked which maybe causing this issue? – Smooth Jul 01 '22 at 08:42
  • Why are you using date table inside measure? It's not necessary. Use Date column from your fact table. Also, you can decompose this measure into separate measures (1 variable - 1 measure), add them into table with other data and try to understand on which step complex measure returns wrong result. – Darkitechtor Jul 02 '22 at 12:19
  • Thanks! I managed to get it to work :) – Smooth Jul 09 '22 at 08:13
  • Nice! Then vote up for my answer and mark it as correct if you don't mind. – Darkitechtor Jul 09 '22 at 19:01