Forum Discussion
Filter by customer subtotal
I've got a large table of customer invoices (invoice date, amount, customer name, etc.). I want to create card showing the total of all invoices only for customers whose overall invoice balances are greater than $50,000 cumulatively (not based on individual invoices).
In other words...
- Customer A has 5 invoices each for $20,000, totaling $100,000 of invoices.
- Customer B has 3 invoices each for $5,000, totaling $15,000 of invoices.
- Customer C has 2 invoices each for $30,000, totaling $60,000 of invoices.
I want the card to show total invoices of $160,000 (the sum of all customers whose cumulative balance is over $50,000).
I've tried creating a column with the cumulative customer balance or a measure calculating it but have been unsuccessful. Any thoughts on how to solve this? Thank you!
Hi Debits123 ,
Assuming that you have the data sample like below.
You could create the measures below.
Total amount = CALCULATE ( SUM ( Table2[Amount] ), ALLEXCEPT ( Table2, Table2[Customer] ) ) Measure = CALCULATE ( [Total amount], FILTER ( 'Table2', [Total amount] > 50000 ) )
Here is the output.
If you still need help, please share your data sample as table format so that I could have a test on it and help further on it.
Best Regards,
Cherry
1 Reply
- v-piga-msft
Resident Rockstar
Hi Debits123 ,
Assuming that you have the data sample like below.
You could create the measures below.
Total amount = CALCULATE ( SUM ( Table2[Amount] ), ALLEXCEPT ( Table2, Table2[Customer] ) ) Measure = CALCULATE ( [Total amount], FILTER ( 'Table2', [Total amount] > 50000 ) )
Here is the output.
If you still need help, please share your data sample as table format so that I could have a test on it and help further on it.
Best Regards,
Cherry