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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

I want to show cumulative sum in the chart

I have data as below - 

 

Alice08_0-1736407797477.png

 

i want to create a logic which will show cumulative sum like below

Jan - 30

Feb - Jan + 20

Mar - Jan +Feb+ 50

Apr - Jan +Feb + Mar +20

6 REPLIES 6
Anonymous
Not applicable

Hi, @Anonymous 

Thanks for the reply from @PijushRoy@suparnababu8 and @ryan_mayu. You can refer to their methods or try using following dax to achieve your need.

vyaningymsft_0-1737533101776.png

 

Cumulative Value = 
VAR _year = SELECTEDVALUE('Table'[Year])
VAR _re = 
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALLSELECTED('Table'),
        'Table'[Year] = _year &&
        'Table'[Month] <= MAX('Table'[Month])
    )
)
RETURN
_re

 

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

PijushRoy
Super User
Super User

Hi @Anonymous 
Please find the solution below.
For example, the fiscal year start date is 1st April. In my solution no data for Jan Feb March, so as cumulative showing total number
The calendar table is marked as Date Table in the model
Please change the dax as per your data model. 

PijushRoy_0-1736415089976.png

 

 

CumulativeSales = 
VAR SelectedDate = MAX('Calendar'[Date])
VAR FiscalYearStart = DATE(YEAR(SelectedDate) - IF(MONTH(SelectedDate) < 4, 1, 0), 4, 1)
VAR YTD_Calculation =
    CALCULATE(
        SUM(Sales_Invoice[Invoice Value]), 
        FILTER(
            ALL('Calendar'),
            'Calendar'[Date] >= FiscalYearStart && 'Calendar'[Date] <= SelectedDate
        )
    )
RETURN
    YTD_Calculation

 

 

 

Please let me know




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





suparnababu8
Super User
Super User

Hi @Anonymous 

 

you can use 

RUNNINGSUM 

DAX to achieve your requirment. 

 

Thanks

ryan_mayu
Super User
Super User

could you pls provide some sample data?





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

Proud to be a Super User!




Anonymous
Not applicable

Alice08_0-1736414141615.png

Sample data

 

you don't have the date column in your data? It's better to have a date column

 

then create a column

 

Column = sumx(FILTER('Table','Table'[Year]=EARLIER('Table'[Year])&&'Table'[date]<=EARLIER('Table'[date])),'Table'[Value])
 
11.PNG




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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.