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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Lovebo95
Helper I
Helper I

Cumulative total with Filter, DatesInPeriod, DatesBetween

Hi everyone,

 

I am trying to understand the function for cumulative total, I am using this function :

 

Sales cumulate = calculate(
	SUM(Table[Sales]);
	Filter(ALL(DimDate);
		DimDate[Date]<=MAX(DimDate[Date])))

 

 

I am trying to understand the filter so I tried with datesInPeriod something like :  

 

 

Sales cumulate = calculate(
       SUM(Table[Sales]);
       DATESINPERIOD(DimDate[Date];MAX(DimDate[Date]);-12;MONTH))

 

 

It was working good, I had a cumulative sum, but when I try with datesbetween :

 

 

Sales cumulate = calculate(
  SUM(Table[Sales]);
  DATESBETWEEN(DimDate[Date];MIN(DimDate[Date]);MAX(DimDate[Date])))

 

 

The sum is not cumulative with datesbetween, it's like a sum(Table[Sales]) function.

 

Do you know why ?

 

Thank you ! 🙂

Regards, 

Lovebo

1 REPLY 1
Anonymous
Not applicable

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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