Forum Discussion
Anonymous
8 years agoNot applicable
DAX formula to Calculate Column Cumulative Total
Hello, I am trying to add a calculated column to the dataset so that I can plot a line graph that shows cumulative total cost by week or month. It this possible given that there are several lines tha...
- Anonymous8 years ago
Hi, Thank you, I couldn't not make it work, but the following worked:
New Measure
Running Total=
CALCULATE(Sum(Table[Total Cost]),
ALL('Table'),Table[Work Date]<=EARLIER(Table[Work Date]))
Greg_Deckler
Community Champion
8 years agoBasically something like this:
Cumulative Total = VAR myDate = MAX([Work Date]) VAR myMonth = MONTH(myDate) VAR tmpTable = FILTER(ALL(Table),[Month no.] <=myMonth) RETURN SUMX(tmpTable,[Total Cost])
Anonymous
8 years agoNot applicable
Hi, Thank you, I couldn't not make it work, but the following worked:
New Measure
Running Total=
CALCULATE(Sum(Table[Total Cost]),
ALL('Table'),Table[Work Date]<=EARLIER(Table[Work Date]))