Forum Discussion

Digger's avatar
Digger
Post Patron
4 years ago

Substract sumarized measures

Trying to find differnet between prices but PBI sum except of minus

 

Payments =
SUMX (
SUMMARIZE ( Table, Table[_Eur_Pay],Table[id], Table[type] ),
CALCULATE(MAX(Table[_Eur_Pay]))
)
-------------------------------------
Products =
SUMX (
SUMMARIZE ( Table, Table[_Eur_Prod],Table[order_products.id]),
CALCULATE(SUM(Table[_Eur_Prod]))
)
-------------------------------------
_Price_Diff = [Payments]-[Products]

3 Replies

  • Digger , try a measure like

     

    SUMX (
    SUMMARIZE ( Table, Table[_Eur_Prod],Table[order_products.id], "_1", MAX(Table[_Eur_Pay]) , "_2" , SUM(Table[_Eur_Prod]) )
    [_1]-[_2]
    )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Digger ,

     

    Please share some sample data so that we could check the formula for you.

     

    Best Regards,

    Jay