Forum Discussion
Paulzz
9 years agoRegular Visitor
Cumulative sum pattern
I've attempted to follow the Ferrari / Russo DAX pattern for cumulative sum, where they suggest (based on their own sample data): Cumulative Quantity = IF(MIN('Date'[Date]) <= CALCULATE(MAX(Trans...
- 9 years ago
ALLSELECTED shall work. Try
Cumulative Quantity = IF ( MIN ( 'Date'[Date] ) <= CALCULATE ( MAX ( Transactions[Date] ), ALLSELECTED ( Transactions ) ), CALCULATE ( SUM ( Transactions[Quantity] ), FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) ) )Check a demo in the attached pbix.