Forum Discussion
iansimpson888
3 years agoRegular Visitor
creating a rolling average
Hi, i have a table displaying the weekly average attendance of a student: It is calculated using a 'rolling' average, so: week 1 actual (05/09/2022) = 100% week 1 rolling (05/09/2022) ...
- Anonymous3 years ago
Hi iansimpson888 ,
I suggest you to try ALL() and add [Full Name] column into filter code part.
Weekly % Attendance (Rolling) = AVERAGEX ( FILTER ( ALL ( 'powerbi_attendance_weekly_average' ), 'powerbi_attendance_weekly_average'[Mark Date (Weeks DD/MM/YY)] <= MAX ( powerbi_attendance_weekly_average[Mark Date (Weeks DD/MM/YY)] ) && 'powerbi_attendance_weekly_average'[Full Name] = MAX ( 'powerbi_attendance_weekly_average'[Full Name] ) ), 'powerbi_attendance_weekly_average'[Weekly % Attendance] )Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
3 years agoiansimpson888 Drop your ALLSELECTED.