Forum Discussion

Trosa_220568's avatar
Trosa_220568
Regular Visitor
4 years ago
Solved

Monthly Cumulative total

Hi,

I'm trying to create a report that shows the current months total to date (From the beginning of the month to the selected date). That's easy, but I then also want to show what previous months cumulative total was at that point.

Example: I select 22/04/2022 and can see a sales total amount of what has been sold up until that date. I know also want to see what was sold up until the same day previous month.

 

Any ideas how this can be achieved? 

  • I have ended up using this:

    Rolling Total = IF(ISBLANK('Sales'[Total Sales]),BLANK(),TOTALMTD('Sales'[Total Sales],'Calendar'[Date]))

    It gives me a running total for each month so that an easy comparison can be made.

2 Replies

  • SpartaBI's avatar
    SpartaBI
    Community Champion

    Hey Trosa_220568 try:

     

    All_Selected_Until_One_Month_Back = 
    VAR _current_date = 'Date'[Date]
    RETURN
    CALCULATE(
    	[Sales],
    	ALLSELECTED('Date'),
    	'Date'[Date] <= DATEADD(_current_date,-1,MONTH)
    )

     

  • I have ended up using this:

    Rolling Total = IF(ISBLANK('Sales'[Total Sales]),BLANK(),TOTALMTD('Sales'[Total Sales],'Calendar'[Date]))

    It gives me a running total for each month so that an easy comparison can be made.