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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
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: