I'm trying to calculate the rolling sum in the MS Power BI application using DAX.
I've got the following table, and adding another column which would display the running total of the [hours] column,
But I'm only getting 1 distinct value to each row (grand total) with the following DAX,
RollingTotal =
calculate (sum('costtrackerdb timesheet'[hours]),
FILTER(ALL('costtrackerdb timesheet'),
'costtrackerdb timesheet'[Week] < 20),
values('costtrackerdb timesheet'[Week]))
Where am I going wrong..? I would potentially achieve two things,
- Running total hours of the entire rows
- Running total hours by each staff