Forum Discussion

Andreasaaroe's avatar
Andreasaaroe
New Member
2 years ago

Running total same as previous if blank

Hi All.

 

Im currently trying to make a DAX Command which wont leave running total value blank if there is no value in the given year/week.

 

Currently I have the following graph where the problem is well illustrated:

 

Im useing the following columns on my axis' and as legend:

 

X-axis: Merged year and week column. Given in text format.

Y-Axis: Quick-Measure for running total:

 

AcumulatedStatus = 
CALCULATE(
            COUNTA('UseData'[Status]),
            FILTER(
                        ALLSELECTED('UseData'[Change-Year-Week]),
                        ISONORAFTER('UseData'[Change-Year-Week], MAX('UseData'[Change-Year-Week]), DESC)
            )
)

 

 

Legend: Status column (The column consists of 3 text values, shown on each line in above graph)

 

I need help to write a measure/make changes so I wont have gaps between data points on the graph.

 

Thanks in advance. 


Best regards,

 

Andreas.

 

 

 

2 Replies

  • use a date column for the x axis and make the axis continuous instead of categorical.

  • Hi,

    Does this measure work?

    AcumulatedStatus = CALCULATE(COUNTA('UseData'[Status]),datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))