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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
wsmaguire
New Member

Cumulative total across a row

Hi All;

 

Relatively new to PowerBI here, and struggling....

I am trying to show a cumulative cash flow over time across a row. I see many options for cumulative totals down a column, but I need a row:

Name                    Jan             Feb              Mar

Project 1                 10               10                 5

Project 2                   7                -3                 6

Total                       17                 7                11

Cumulative             17                 24              35 <---- How do I create this row??

 

I am hopeful, but my optimism is waning....    

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi wsmaguire,

You could change data structure by M code and add a Total row in it, then use measure to calculate cumulative value. You could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi wsmaguire,

You could change data structure by M code and add a Total row in it, then use measure to calculate cumulative value. You could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TomMartens
Super User
Super User

Hey @wsmaguire ,

 

I recommend that you transform your data structure from a wide format (a column for each month) into a long format (two columns that form a key value pair: month column and value column), but maybe this is just a misunderstanding as you used the wide format for better visualizing your requirement.

 

This site https://www.daxpatterns.com/time-patterns/ contains almost anything that's necessary to create time and date related calculations using DAX.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.