Forum Discussion
Running Total
I have Measure Created for Total Saving and I would like to show the running total of Total Saving
Total Saving in:
Jan
Jan + Feb
Jan + Feb Mar and so on
I have used the mentioned below
running total measure = CALCULATE(SUM(Table1[Sales]),
FILTER(ALL(Table1),
'Table1'[Date] <= MAX('Table1'[Date])
&&
YEAR('Table1'[Date]) = YEAR(MAX('Table1'[Date]))))
5 Replies
- nandicResident Rockstar
Hi Anonymous ,
Did you try using function TotalYTD?
Screenshot below displays 3 columns in list: YearMonth, Sales, Running Total. You can see that each year it reset, starts from beginning of the year until the end of year.
In order to use it, you should mark you date table as date table. - Ashish_MathurSuper User
Hi,
Try these measures
Sales = SUM(Table1[Sales])
Sales YTD = calculate([Sales],datesytd('Date'[Date]))
To your visual, drag the Month Name from the Date Table. Select a Year in the slicer.
Hope this helps.
- v-xicaiCommunity Support
Hi Anonymous ,
You may change the formula like DAX below.
running total measure = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALLSELECTED ( Table1 ), YEAR ( 'Table1'[Date] ) = YEAR ( MAX ( 'Table1'[Date] ) ) && MONTH ( 'Table1'[Date] ) <= MONTH ( MAX ( 'Table1'[Date] ) ) ) )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Tahreem24Super User
Anonymous ,
Please try a below measure:
Running total =CALCULATE(SUM(Sheet1[Sales]),FILTER(ALL(Sheet1),Sheet1[Date] <=MAX(Sheet1[Date]) && MONTH(Sheet1[Date])<=MONTH(MAX(Sheet1[Date]))))I replicated on my data and got the result. - v-xicaiCommunity Support
Hi Anonymous ,
Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy