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
niberxz
Regular Visitor

Cumulative issue

Hello everyone, I am trying create an acomulative sum by date but recently I found a issue using this:

  • CALCULATE(DISTINCTCOUNT(Gestion[GesTot]),FILTER(all(Gestion),Gestion[FecGestion]<=max(Gestion[FecGestion])))

I was using the same statement with countax like this:

  • intensidad = CALCULATE((COUNTAX(Gestion,Gestion[VecesLlamada]>0)),FILTER(ALL(Gestion),Gestion[FecGestion]<=max(Gestion[FecGestion])))

This is the graph of "DISTINCTCOUNT(Gestion[GesTot])"

Screenshot_21.png

and this is "CALCULATE(DISTINCTCOUNT(Gestion[GesTot]),FILTER(ALL(Gestion),Gestion[FecGestion]<=max(Gestion[FecGestion])))"

Screenshot_22.png

The previous graph should have the accumulated sum by date and not be linear.

 

2 REPLIES 2
MalS
Resolver III
Resolver III

Is "Gestion[FecGestion]" your Date field in your calendar table, because that's what you need for a cumulative sum. Here's a great explanation of the pattern: http://www.daxpatterns.com/cumulative-total/  

 

Also, you say you want to do a sum, but you are using DISTINCTCOUNT - is that intentional?

Vvelarde
Community Champion
Community Champion

@niberxz

 

Hi, please sample Data to Evaluate a Solution to this.

 

Thanks




Lima - Peru

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.