Forum Discussion
wjshell
3 years agoNew Member
Calculate average rate on days between dates
Hi - i'm very much a novice on Power BI and have limited understanding of how DAX works and how to use calculated tables, but find it a fantastic tool for the parts I do understand. However, I've ...
v-yadongf-msft
Community Support
3 years agoHi wjshell ,
Please try:
average rate =
var sum_nights = SUM('Table'[Nights])
var sum_rate = SUMX(ALL('Table'),[Nightly rate] * [Nights])
return
DIVIDE(sum_rate, sum_nights)
Is this the result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.