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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
RYU209
Helper III
Helper III

SUMX for cumulative sum not working as expected

Hello,

I'm trying to use SUMX to create a cumulative sum of a measure that counts the amount of distinct Projects. 

Currently I have a distinct incomplete Project count measure:

Incomplete Projects = 

CALCULATE(DISTINCTCOUNT(Table1[ProjectID]), Table1[ProjectStatus] IN {"PLN", "CUR", "ONH"})

I'm trying to view the cumulative sum of this measure over time using the following:

Cumulative Active Projects = SUMX('DateTable', [Incomplete Projects])

Here is my output:
RYU209_0-1699558613889.png

 

For some reason my Cumulative Active Projects measure is not adding up over time. What am I doing wrong here?

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hi! You can use a running total through quick meausures, or use the below DAX:

DistinctCount running total in Date =
CALCULATE(
    [Active Projects],
    FILTER(
        ALLSELECTED('Date'[Date]),
        ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
    )
)
 
audreygerred_0-1699559955366.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

5 REPLIES 5
audreygerred
Super User
Super User

Hi! You can use a running total through quick meausures, or use the below DAX:

DistinctCount running total in Date =
CALCULATE(
    [Active Projects],
    FILTER(
        ALLSELECTED('Date'[Date]),
        ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
    )
)
 
audreygerred_0-1699559955366.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you @audreygerred, that worked perfectly. I'm still curious, though, why is my old measure not working?  

No problem! SUMX is an iterator function so it completes the summing at each row, then sums those up for a total, but it is not meant for cumulative or running total - just a row and total. Here is a blog I recently wrote abot iterators: http://powerbiwithme.com/2023/11/01/the-iterator-edition/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





OK, when I looked up similar questions to mine I saw many people using SUMX. Thank you for the explanation! 

Anytime! Thanks for asking!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors