Forum Discussion
Running Totals per Month
Hi,
I can't seem to run my running totals properly when using the date table (Relationship between First Transaction Date and Date in Date Table) and x-axis categorical type, but functions okay when used with a "Continuous" X-Axis using the First Transaction Date on the Transaction Table.
Continuous using First Transaction Date from Transaction Table:
Categorical using Date from Date Table:
Here's the current code:
Anonymous , You can have running total like
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
if you want it to be reset at the month level
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
2 Replies
- amitchandak
Super User
Anonymous , You can have running total like
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
if you want it to be reset at the month level
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
- AnonymousNot applicable
Thank you so much amitchandak !