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! Learn more

Reply
michellefs_br
Helper I
Helper I

Running Totals in Query Editor

I'm really focusing in trying to do the running Totals in Power BI query editor

 

What I have is basically a Table with count of people by the End Date and another table with a count of people by the start date, I also created a relationship with the start date on both tables, so when the end date, I want to create a new table with a join of both Start and End tables (it's giving me errors because of null data). And once done I want do do the running totals based on the start date minus the end date grouped by per month.

2.PNG1.PNG

8 REPLIES 8
Greg_Deckler
Community Champion
Community Champion

Does it have to be Power Query, there are well known patterns for this in DAX:

 

http://www.daxpatterns.com/cumulative-total/

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I've tried that one in DAX and it gives me only the total value and put it on each row3.PNG


@michellefs_br wrote:

I've tried that one in DAX and it gives me only the total value and put it on each row3.PNG


You've inserted the calculation as a column. It won't work properly in that context. If you insert the same DAX expression as a Measure it should do what you are after.

@michellefs_br Can you provide a sample of the data in both tables?

 

And what would be the desired result from that sample?

 

Also what format are the Start and End Dates?

They both have the same values, a Date and a Count.... the desired result would be that one, but on one table instead of two, so I can do a running total using the start date minus the end date

 

1.PNG

Hey!

 

Is there any way that you can provide us with a sample file for us to dig in? I'd recommend doing this as a calculated column with DAX instead of a custom column in the Query Editor (Power Query). You might want to try the EARLIER function too!

Sean
Community Champion
Community Champion

(Start - End) Running Total

RT Balance.png

Could you also create a running total in DAX for EndDate Count and then create a date table, relate the date table to both Start and End tables and then create a calculated column in the date table that essentially subtracts the two related columns from one another?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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