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! Learn more

Reply
Anonymous
Not applicable

Cumulative Sum - Dax Query

 

Hello. I am trying to create a chart that shows the Cumulative sum of Apps Created over time.

 

How can I do it with Dax query ?

 

So far, I created the below chart which gives the Count of Apps created particular month !

  • Y axis -  'App'[admin_appid]
  • X axis -  'App'[admin_appcreatedon]
 

kartrabby_0-1657539699925.png

 

Kindly let me know how to create and plot the Cumulative sum of Apps Created over time.

 

1 ACCEPTED SOLUTION

Hi @Anonymous 
PLease try

Cumulative Sum =
VAR CurrentDtate =
    MAX ( 'App'[admin_appcreatedon] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'App'[admin_appid] ),
        'App'[admin_appcreatedon] <= CurrentDtate,
        'App'[admin_appdeleted] = "True",
        ALL ( 'App' )
    )

View solution in original post

7 REPLIES 7
tamerj1
Super User
Super User

HI @Anonymous 
PLease try

 

Cumulative Sum =
VAR CurrentDate =
    MAX ( 'App'[admin_appcreatedon] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'App'[admin_appid] ),
        'App'[admin_appcreatedon] <= CurrentDate,
        ALL ( 'App' )
    )

 

Anonymous
Not applicable

Hello @tamerj1 ,

 

Thank you for responding. I did try the code, but something is not matching with Values.

 

How to exclude values from Table 'App' where admin_appdeleted is equal to true from the below code ?

 
Cumulative Sum =
VAR CurrentDtate =
    MAX ( 'App'[admin_appcreatedon] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'App'[admin_appid] ),
        'App'[admin_appcreatedon] <= CurrentDtate,
        ALL ( 'App' )
    )

 

Hi @Anonymous 
PLease try

Cumulative Sum =
VAR CurrentDtate =
    MAX ( 'App'[admin_appcreatedon] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'App'[admin_appid] ),
        'App'[admin_appcreatedon] <= CurrentDtate,
        'App'[admin_appdeleted] = "True",
        ALL ( 'App' )
    )

From where did you get admin_appdeleted column? it wasn't mentioned in the original post or am I missing something

@Fahad12 
Perhaps I got it through mail or private message or sometimes I connect with the post owner via teams or zoom. To be honest, I don't remember 🙂

Anonymous
Not applicable

Hello @tamerj1 , thank you for the help. It did help me a lot.

amitchandak
Super User
Super User

@Anonymous , You need to create a measure like

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

or

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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