Forum Discussion

ROBERTOCMRNO's avatar
ROBERTOCMRNO
Frequent Visitor
9 years ago
Solved

Weighed Average DAX Expression

I need a help... I want to do this expressin dax, but I´m with problems in the days. Someone help me? Thank you.
  • v-ljerr-msft's avatar
    v-ljerr-msft
    9 years ago

    Hi ROBERTOCMRNO,

     

    Could you post your all table structures with some sample data in this case? Without knowing that we can only guess and offer possible suggestions.:smileyhappy:

     

    Normally, the DAX expression for Weighted Average should be similar like below.

    [Average Med Age Weighted by Pop]=
    SUMX(Zips, Zips[TTL Pop] * Zips[Med Age]) / [Total Population]

    And

    WAC = SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] * [INTEREST_RATE] )
        / SUMX ( 'Analytics_SourceDat', [Net_Active_Balance] )

    In addition, here is a similar thread, and here is a good article about Weighted Averages(DAX) for your reference.

     

    Regards