Forum Discussion

Ali_Chibani's avatar
Ali_Chibani
Frequent Visitor
2 years ago
Solved

Calculate contribution to growth

Hello everyone,   I am trying to calculate a new measure that shows each car type's contribution to monthly and quarterly growths. For instance, as you can see in the image below, car sales rose 3....
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Ali_Chibani ,

    Please try to create a measure with below dax formula:

    Contribution Percent =
    VAR _a =
        SUMX (
            FILTER ( ALL ( car_sales ), [Date] = SELECTEDVALUE ( car_sales[Date] ) ),
            [Sales amount]
        )
    VAR _b = [$ growth]
    RETURN
        DIVIDE ( _b, _a )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.