Forum Discussion
Dave1982
4 years agoFrequent Visitor
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 ...
- 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.
v-xiaotang
Community Support
4 years agoHi 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.