Forum Discussion

Digger's avatar
Digger
Post Patron
4 years ago
Solved

Wrong price different

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]
  • Hi Digger ,

     

    Thank you for the screenshot.

    If I see your screenshot, you are showing this metrics at type level.

    While you 2nd DAX is summarised and calculated at different set of columns. I think this might be causing the issue here.

     

    Have you tried checking your measures independently, whether they are calculated correctly when summarised at relevant columns.

    Try creating 2 tables:

    • 1st table - all columns in summarised statement of 1st DAX and the measure
    • 2nd table - all columns in summarised statement of 2nd DAX and the measure

    Thanks,

    Pragati

     

5 Replies

  • Hi Digger ,

     

    Just looking at your 2 DAX expressions, both expreassions are summarising the value at different granularities.

    • 1st DAX summarises a value at Table[_Eur_Pay],Table[id], Table[type] columns
    • 2nd DAX summarises a value at Table[_Eur_Prod],Table[order_products.id] columns
    • Also I don't have visibility on your complete table, like what is the left-most column on your table visual against which you are trying to represent these measures.

    Can you share a complete screenshot please?

     

    Thanks,

    Pragati

      • Pragati11's avatar
        Pragati11
        Super User

        Hi Digger ,

         

        Thank you for the screenshot.

        If I see your screenshot, you are showing this metrics at type level.

        While you 2nd DAX is summarised and calculated at different set of columns. I think this might be causing the issue here.

         

        Have you tried checking your measures independently, whether they are calculated correctly when summarised at relevant columns.

        Try creating 2 tables:

        • 1st table - all columns in summarised statement of 1st DAX and the measure
        • 2nd table - all columns in summarised statement of 2nd DAX and the measure

        Thanks,

        Pragati