Forum Discussion
rack201
5 years agoFrequent Visitor
Cumulative total based on non unique dates AND text filter
Hi - my table has non-unique dates and I'm trying to calculate a running total for a given date AND text filter pair. My data looks the equivalent of something like the below and what I'm aiming fo...
- 5 years ago
Hi rack201
Try this code to add a column to your table:
Cumulative Revenue = VAR _Date = FIRSTNONBLANK ( 'Table'[WeekEndingDate], "" ) RETURN CALCULATE ( SUM ( 'Table'[Revenue] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[Store] ), 'Table'[WeekEndingDate] <= _Date ) )Output :
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos ✌️!!
qwertzuiop
Advocate III
4 years agoHello guys 😀
Code works perfektly thanks 💪
But any idea how to manipulate the code to calculate the average instead of sum?
Thanks for your contribution
Cheers
qwertzuiop