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
hyugo_v
Helper I
Helper I

Cumulative sum not working correctly

Hello everyone,

 

i'm trying to get a cumulative sum here but it looks like it doesn't consider the parameters i put in the dax formula. I've tried the same formula in a dataset i made up myself and it worked properly.
The table name is : '6_RIE_couloir'

What i want to sum is : '6_RIE_couloir'[Sum E1+E2]

And minute by minute : '6_RIE_couloir'[Heure]

Here is a screenshot for a better explanation : (i've got 0 value at the begging in the column "sum E1 +E2" but there are plenty after that

cmul.PNG

Any ideas ?

Regards,

 

 

1 ACCEPTED SOLUTION

I found the solution to my problem, i took the wrong parameter in the ALL fonction. 

Here is the correct one :

Cumulative = CALCULATE(
SUM('6_RIE_couloir'[Sum E1+E2]),
FILTER(ALL('6_RIE_couloir'[Heure]),'6_RIE_couloir'[Heure]<=MAX('6_RIE_couloir'[Heure])
))
 
cmul3.PNG
Regards,

View solution in original post

4 REPLIES 4
jdbuchanan71
Super User
Super User

So it is giving you what you are asking for.  The Sum of  the column [Sum e1+e2] where the Haure is <= the current row and ignore everything else.  

jdbuchanan71_0-1620402250306.png

What are you wanting it to give you?  What should the number in the last column be for the highlighted rows?

 

I found the solution to my problem, i took the wrong parameter in the ALL fonction. 

Here is the correct one :

Cumulative = CALCULATE(
SUM('6_RIE_couloir'[Sum E1+E2]),
FILTER(ALL('6_RIE_couloir'[Heure]),'6_RIE_couloir'[Heure]<=MAX('6_RIE_couloir'[Heure])
))
 
cmul3.PNG
Regards,
jdbuchanan71
Super User
Super User

If you clear the filter on Date then filter Heure to just 00:00:00 and 00:01:00, what shows up in the [Sum E1 + E2] column?

Hello, 

 

i forgot to put some context, the dataset in recording the flux of people through the day, generally people tend to come at 11/11:30 AM so the E1+E2 column have bigger value at that moment, if i filter between 00:00:00 and 01:00:00 that's what i get. 

Edit : If i remove the Date filter, the chronology is broken.

cmul2.PNG

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.