Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I've been facing an issue when calculating cumulative sum and looking for alternative ways to do it.(other than unpviot columns)
The requirment is to get cumulative sum of values in all the months over few consecutive years and the issue is that when calculating cumulative sum the values of previous years(month-wise) are to be omitted(subtracted) in order to get the required result.
Here is a pic of the data sample and link to access the data : toffeeshare.com/c/9OUbuKo13W
The target is to showcase the cumulative sum from a ceratin date to a certain date in a 'Stacked area chart' like below :
Knowing that this might require too many calculations to solve and get the required result, any reply is welcome!
Solved! Go to Solution.
@ThingZy Well, I would unpivot the month columns and rename the Attribute column to Month, then add a column like:
MonthSort =
SWITCH('Table'[Month],
"Jan",1,
"Feb",2,
"Mar",3,
// etc.
)
This will make a cumulative total super easy. Better Running Total - Microsoft Power BI Community
Otherwise, without unpivoting you are going to have some nasty logic and I don't even know how you are going to construct an x-axis having all of your values in different columns. Ugly.
@ThingZy What is the problem with unpivoting? Otherwise, it gets ugly.
@Greg_Deckler
Hello Greg Deckler
The problem is not with unpivoting. Not sure but to obtain the solution it seems that things might get ugly like you have mentioned('Otherwise, it gets ugly')
I'd appriciate any suggestion
Thanks,
Soumith
@ThingZy Well, I would unpivot the month columns and rename the Attribute column to Month, then add a column like:
MonthSort =
SWITCH('Table'[Month],
"Jan",1,
"Feb",2,
"Mar",3,
// etc.
)
This will make a cumulative total super easy. Better Running Total - Microsoft Power BI Community
Otherwise, without unpivoting you are going to have some nasty logic and I don't even know how you are going to construct an x-axis having all of your values in different columns. Ugly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.