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
fmouhcine
Frequent Visitor

Add new calculated Column for Monthly Cumulative total based on date & category

Dear Community,

 

I will need your support please I want to add a calculated column to an existing table where I do have: Date / Country / Volume

 

Below you can see an example from Excel were I have created manually a new column where I m calculating the Monthly Cumulative volume based on the date (should be for the same month & year) & the country

 

Capture.PNG

 

Thanks in advance for your support

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@fmouhcine , Try a new column like

 

Sumx(Filter(Table, [ctry] = earlier([Ctry]) && [Date] <= earlier([Date]) ) , [Volume])

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@fmouhcine , Try a new column like

 

Sumx(Filter(Table, [ctry] = earlier([Ctry]) && [Date] <= earlier([Date]) ) , [Volume])

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s

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

Hi @amitchandak 

 

Many thanks for your reply - that works however the main objective is to have the monthly cumulative, meaning the cumulative must be rest at the beginning of each month.

So I have added additional conditions to mutch the month & the year as below:

VAR _Cumul = SUMX(
                FILTER(Table,
                [Ctry] = EARLIER([Ctry]) &&
                [Date] <= EARLIER([Date]) &&
                MONTH([Date]) = Month(EARLIER([date])) &&
                YEAR([Date]) = YEAR(EARLIER([date]))),
                [Volume]
                )
 
Cheers.
Mouhcine

 

 

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