Forum Discussion

lingvistt's avatar
lingvistt
Frequent Visitor
6 years ago
Solved

Price effect calculation in BI

Hi everyone, I have the following data structure:   I want to calculate total 'Price effect', which is calculated by the following 2 step logic: 1. Calculate 'Price Effect' in absolute by e...
  • v-gizhi-msft's avatar
    6 years ago

    Hi,

     

    Please try this measure:

    Price effect = 
    SUMX (
        DISTINCT ( 'Table1'[Product] ),
        (
            CALCULATE ( [Sales per Kg], Table1[Time] = "2019" )
                - CALCULATE ( [Sales per Kg], Table1[Time] = "2018" )
        )
            * CALCULATE ( SUM ( Table1[Volume] ), Table1[Time] = "2019" )
    )

    And it shows:

    Hope this helps.

     

    Best Regards,

    Giotto Zhi