Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Trosa_220568
Regular Visitor

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? 

1 ACCEPTED SOLUTION
Trosa_220568
Regular Visitor

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.

View solution in original post

2 REPLIES 2
Trosa_220568
Regular Visitor

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.

SpartaBI
Community Champion
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)
)

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.