Forum Discussion

AxelKAp's avatar
AxelKAp
Helper I
3 years ago
Solved

DAX formula partial sum

Hello everyone, 

I need your support to calculate a partial sum. Here I have a table with Purchase Order Number, Invoice Number, PO Amount Total and Invoice Amount. The issue here, I can have one order for several invoice numbers. And in the tab (see below) I want to show the sum of the orders and the sum of the invoices, so that we can see how much we have left to be invoiced. So as you can see in the column PO Amount total the amount for one order is summed up several times. But I would like it to be a sum by taking the PO Amount Total only once.  


I would like to have a total of 7500€ and not 22500€.

Do you have any idea how I can do this ? 

Thanks in advance for your support.

  • Hi AxelKAp 
    Please try

    PO Amount Measure =
    SUMX ( VALUES ( 'Table'[PO Number] ), CALCULATE ( MAX ( 'Table'[PO Amount] ) ) )

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi AxelKAp 
    Please try

    PO Amount Measure =
    SUMX ( VALUES ( 'Table'[PO Number] ), CALCULATE ( MAX ( 'Table'[PO Amount] ) ) )