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
KH11NDR
Helper IV
Helper IV

How do i create a calculated column or measure for totalling up another column as cumulative?

Hi Guys,

 

This is what I want to do, create another column or measure that calculates Total sales per month per project.  My data is exactly how it is in the table without the "Total Sales" column i'm asking help for.

 

Thanks

 

ProjectDateSalesTotal Sales
A01/01/20181010
A01/02/20182030
A01/03/20183060
A01/04/201840100
A01/05/201850150
B01/01/201855
B01/02/20181015
B01/03/20181530
B01/04/20182050
B01/05/20183080
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@KH11NDR

Please check attached PBIX file.

Regards,
Lydia

View solution in original post

12 REPLIES 12
KH11NDR
Helper IV
Helper IV

What's the Dax for this as a measure or column as I can't get the Quick measure calculation to do what I want.

Anonymous
Not applicable

@KH11NDR,

Create a measure using DAX below.

total sales = CALCULATE(SUM(Table[Sales]),FILTER(ALL(Table[Date]),Table[Date]<=MAX(Table[Date])))

1.PNG

Regards,
Lydia

Sorry, That hasn't worked for me.

Anonymous
Not applicable

@KH11NDR,

What error message or what result do you get? Do you create a measure? Make sure you create a measure rather than a calculated column.

Regards,
Lydia

Yes it's a measure, I don't get any error messages, just a blank row, column.

Anonymous
Not applicable

@KH11NDR

Do you create table visual as mine? Could you please share PBIX file to me? You can share PBIX file through OneDrive.

Regards,
Lydia

Do you think it has anything to do with me Unpivoting my columns?

 

Original Data

 

Project ID01/07/201701/08/201701/09/201701/10/201701/11/201701/12/201701/01/201801/02/2018
AAAA05101520253035
BBBB07121824303642

 

Power BI Table

 

ProjectIDDatesValue
AAAA01/07/20170
AAAA01/08/20175
AAAA01/09/201710
AAAA01/10/201715
AAAA01/11/201720
BBBB01/07/20170
BBBB01/08/20177
BBBB01/09/201712
BBBB01/10/201718
BBBB01/11/201724

 

And then in Power BI Matrix table, another row showing the cumualtive totals.

 

Capture.PNG

Anonymous
Not applicable

@KH11NDR

Please check attached PBIX file.

Regards,
Lydia

Thank you, I'll use that as my suggestion, I know where I was going wrong now, I was using my Master Calendar Months for the column and not the date field from my table.

 

Thanks again, I'm pretty sure I'll be needing more help, Im an X QlikView 

shebr
Resolver III
Resolver III

HI @KH11NDR

 

Have you tried using the quick measures to try and get your result? Right click on your dataset and select 'Quick Measure'. Select your value and any other options and this may give you what you want.

 

Let us know how you get on.

 

Thanks

 

shebr

How would you do it? As it's not working for me.

I was just trying that, 

 

I selected Running total calculation, Base value as Sales and Field as Project, I was hoping that would have worked, but It's giving the same figures in the month rather than do a runninig total as expected.

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