Forum Discussion
ronron
7 years agoNew Member
summarize column with preceeding rows
Hi,
i hope someone could help me on my small problem to solve in PowerBI. In sql i would use window functions like "sum(work_diff) over (partition name order by name, date rows unbounded preceding)"
My data table is something like
| date | name | work_diff | wanted result |
| 20190110 | emp1 | 2 | 2 |
| 20190110 | emp2 | 1 | 1 |
| 20190111 | emp2 | -1 | 0 |
| 20190112 | emp2 | 3 | 3 |
| 20190114 | emp1 | -1 | 1 |
| 20190114 | emp2 | -1 | 2 |
i am searching for the "wanted result" column. In that column should be the summarized value of "work_diff" with all preceeding rows included. I tried already summarize and sumx, but i cant get it working.
Maybe someone could help.
THANK YOU
Ron
- Anonymous7 years ago
Hi ronron,
See image I've attached and tell us if works for you.
1 Reply
- AnonymousNot applicable
Hi ronron,
See image I've attached and tell us if works for you.