Forum Discussion
AlbertJan
4 years agoFrequent Visitor
Cummulative sales figures
Hello, I am building a sales dashboard using a table SalesInfoPivot with summarized salesfigures per week. I want to add an extra column with cummulative salesfigures for each week. Part of the t...
- 4 years ago
Try adding EARLIER in so that it knows you're referring to the earlier (original) row context rather than the row context from FILTER.
CummulativeCount = CALCULATE ( SUM ( SalesInfoPivot[CountThisYearPerWeek] ), FILTER ( SalesInfoPivot, SalesInfoPivot[WeekNumber] <= EARLIER ( SalesInfoPivot[WeekNumber] ) ) )
amitchandak
Super User
4 years agoAlbertJan , Try
CummulativeCount = CALCULATE(
SUM( SalesInfoPivot[CountThisYearPerWeek] ),
FILTER(allselected(SalesInfoPivot),
SalesInfoPivot[WeekNumber] <= [WeekNumber]))
or
CummulativeCount = CALCULATE(
SUM( SalesInfoPivot[CountThisYearPerWeek] ),
FILTER(all(SalesInfoPivot),
SalesInfoPivot[WeekNumber] <= [WeekNumber]))
AlbertJan
4 years agoFrequent Visitor
Thanks for yor reply. Unfortunately this does not solve the problems. Rows are not filtered.