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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
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.