Forum Discussion
Anonymous
7 years agoNot applicable
Measure Total Issue - "True'' average
Hi all! I need your help! I have this measure: Single_Res RpD LY WeekDay (DB) = VAR CurrentDate = MAX(RezReporting[Date Booked 2]) RETURN (CALCULATE([Res RpD], FILTER(ALL('Date Booke...
- Anonymous7 years ago
Hi all!
I was hoping to have a more efficient DAX code, but I managed to get the desired results by using the following:
Res RpD LY WeekDay (DB) =IF(HASONEFILTER('Date Booked'[Date Booked]),[Single_Res RpD LY WeekDay (DB)],DIVIDE(SUMX('Date Booked',[Res Rate+Surch+VLF LY Weekday]),SUMX('Date Booked',[Res Days LY WeekDay (DB)])))So this case is closed for now.Thanks!Merel
v-yulgu-msft
7 years agoMicrosoft Employee
Hi Anonymous,
What is the calculation rule for weighted average in your scenario?
Regards,
Yuliana Gu
- Anonymous7 years agoNot applicable
Hi Yuliana,
[Res RpD] =
divide(sumx(RezReporting,RezReporting[Total Bill Rate Charge]+RezReporting[Total Bill Surcharge Charge]+RezReporting[Total Bill Tax 1 Charge]),[Res Days])Hope you can help me!Let me know if you need anything else.- Anonymous7 years agoNot applicable
Hi all!
I was hoping to have a more efficient DAX code, but I managed to get the desired results by using the following:
Res RpD LY WeekDay (DB) =IF(HASONEFILTER('Date Booked'[Date Booked]),[Single_Res RpD LY WeekDay (DB)],DIVIDE(SUMX('Date Booked',[Res Rate+Surch+VLF LY Weekday]),SUMX('Date Booked',[Res Days LY WeekDay (DB)])))So this case is closed for now.Thanks!Merel