Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi my friends!
Please, how do I calculate all quantities received by purchase order number?
In the example below, I received item P/N 24431 on three different dates (10,000 per delivery) with Purchase Order 318431 and need to show this cumulative received in the "TotalReceived" column. In this case it should be displayed as 30,000 units from TotalReceived:
Best Regards!
OFilho
As we haven’t heard back from you, we wanted to kindly follow up to check if the suggestions provided by the community members for the issue worked. Please feel free to contact us if you have any further questions.
Thanks and regards
Hi @OsvaldoFagundes
You can solve this using a DAX measure that calculates the cumulative quantity received per PONumber.
Here's how:
TotalReceived =
CALCULATE(
SUM(Sheet1[Received]),
ALLEXCEPT(Sheet1, Sheet1[PONumber])
)
This measure:
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
Hi @OsvaldoFagundes ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
Hi @OsvaldoFagundes ,
Please try below measure:
PONumber Total = CALCULATE(
SUM('Table'[Received]),
ALLEXCEPT('Table','Table'[PONumber])
)
output will look like below:
You can experiment with allexcept to try different columns subtotals.
please mark it as resolved once confirmed.
Hi Praful!
Thanks a lot my friend!
Unfortunately it doesn't work. I got 60,000 instead of 30,000 🙄
It appears that the value of the quantity received is doubling. Take a look at other PO:
Best Regards!
Hi @OsvaldoFagundes ,
can you provide sample data so that i can try again?
based on screenshots it lookslike we have to include PartNumber column also.
Please try below measure:
PONumber Total = CALCULATE(
SUM('Table'[Received]),
ALLEXCEPT('Table','Table'[PONumber],'Table'[PartNumber])
)
if this doesnt work,please send me sample data here or dm me directly
thanks and regards,
praful
@OsvaldoFagundes I believe that something like this should work:
TotalReceived =
VAR _PONumber = MAX( 'PurchaseOrder'[PONumber] )
VAR _Return = CALCULATE( SUM( 'PurchaseOrder'[Received] ), FILTER( 'PurchaseOrder', [PONumber] = _PONumber ), ALL( 'PurchaseOrder' ) )
RETURN _Return
Hi Gerald!
Thanks for your help!
I applied your measure, but it didn't work. For PO 318431 it would return 30,000:
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
6 | |
4 | |
3 |