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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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

9 REPLIES 9
v-nmadadi-msft
Community Support
Community Support

Hi @OsvaldoFagundes 

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

Olufemi7
Helper I
Helper I

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:

  • Sums all Received values.
  • Groups the sum by PONumber, so each row with the same PO shows the same total.

    Olufemi7_0-1759642719899.png

     

v-nmadadi-msft
Community Support
Community Support

Hi @OsvaldoFagundes 

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

v-nmadadi-msft
Community Support
Community Support

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.

Praful_Potphode
Resolver I
Resolver I

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.