running total based on a customer # colum

BORUCH

Well-known Member
Joined
Mar 1, 2016
Messages
528
Office Version
  1. 365
Platform
  1. Windows
hi

i have a power piviot table
customer #, invoice # invoice, amount, etc...

i would like a Dax formula that would give me a running total based on my customer # field

At every change in customer # it recalculates FOR EX.

CUSTOMER #INVOICE #AMOUNTRUNNING TOTAL
A0011200200
A0012200400
B0013150150
B0014200350

<tbody>
</tbody>

Any help is greatly appreciated
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
any updates i have not gotten any response
 
Upvote 0
i'm not using a date column that is the biggest problem its by customer #
 
Upvote 0
How do you want to visualise this? Your question shows a table, but you don't need the running total materialised in a table. So it depends how you want to visualise this as to what the measure needs to be. If you want to place customer on rows In a pivot and see the running total, you could use something like this

=calculate(sum(table[amount]),filter(allexcept(table,table[customer]),table[invoice num] <= max(table[invoice num]))
 
Last edited:
Upvote 0
How do you want to visualise this? Your question shows a table, but you don't need the running total materialised in a table. So it depends how you want to visualise this as to what the measure needs to be. If you want to place customer on rows In a pivot and see the running total, you could use something like this

=calculate(sum(table[amount]),filter(allexcept(table,table[customer]),table[invoice num] <= max(table[invoice num]))


it doesn't seem to work I would like it as a calculated column
 
Upvote 0
I'm happy to help debug why it doesn't work if you post a sample work book. I can't bring myself to help you with a calculated column as to me this is like asking a steak chef for tomato sauce/ketchup :)
 
Upvote 0
While i totally agree with Matt Allington that you should create a measure for this and not a calculated column, i'm just a corner hotdog stand chef so while i have not tested it, this calculated column should work:

=calculate(sum(Table[AMOUNT]),filter(allexcept(table,Table[CUSTOMER #]),Table[INVOICE #] <= EARLIER(Table[INVOICE #])))

But again you should use a measure...
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top