Forum Discussion

zfraz's avatar
zfraz
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Weighted Average

I'm trying to calculate planned efficiencies for production data but am having trouble figuring out how to get the weighted averages based on the standards. I am trying to calculate what % of the day...
  • v-yulgu-msft's avatar
    9 years ago

    Hi zfraz,

     

    In above table, you can create two calculated columns referring to below DAX formula:

    planned eff for each item =
     (
        'Weighted Average'[Run Hours]
            / (
                CALCULATE (
                    SUM ( 'Weighted Average'[Run Hours] ),
                    ALLEXCEPT ( 'Weighted Average', 'Weighted Average'[Date] )
                )
            )
    )
        * 'Weighted Average'[STD EFF]
    
    planned eff =
    CALCULATE (
        SUM ( 'Weighted Average'[planned eff for each item] ),
        ALLEXCEPT ( 'Weighted Average', 'Weighted Average'[Date] )
    )

     

    Best regards,
    Yuliana Gu