Forum Discussion

Dave1982's avatar
Dave1982
Frequent Visitor
4 years ago
Solved

Cost Per Member Calculation By Month

Hello, I am relatively new to Power BI and DAX and having trouble writing this Dax code for what I feel is rather simple formula.   I am looking to be able to do a calculation for Cost Per Member ...
  • v-xiaotang's avatar
    4 years ago

    Hi Dave1982 

    Thanks for reaching out to us.

    You can try this measure,

    avg = 
    var _members=CALCULATE(SUM(Table2[Member Count]),FILTER(ALL(Table2),Table2[Year]=MIN(Table1[Year]) && Table2[Quarter]=MIN(Table1[Quarter]) && Table2[Month]=MIN(Table1[Month])))
    return DIVIDE(MIN(Table1[Total Op Ex]),_members)

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.