Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
OsvaldoFagundes
Regular Visitor

How to calculate all partially received goods by purchase order number

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:

 

PrintBI.png

 

PrintDax.png

 

Best Regards!

OFilho

5 REPLIES 5

Hi @OsvaldoFagundes ,

 

Please try below measure:

PONumber Total = CALCULATE(
    SUM('Table'[Received]),
    ALLEXCEPT('Table','Table'[PONumber])
    )

output will look like below:

Praful_Potphode_0-1758767478521.png

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 🙄

 

PrintBI.png

It appears that the value of the quantity received is doubling. Take a look at other PO:

PrintBI.png

 

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

GeraldGEmerick
Responsive Resident
Responsive Resident

@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:

 

PrintBI.png

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.