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 ✌️!!
VahidDM
Super User
5 years agoHi 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 ✌️!!
- rack2015 years agoFrequent Visitor
Brilliant - Thank you VahidDM..