Forum Discussion
Mystery
6 years agoHelper I
Cumulative Sum using DAX
Hi, I am trying to compute the cumulative sum using below DAX formula: Cumulative SUM= VAR MAXDATE = CALCULATE (value(LEFT(MAX ('Date'[DateKey]),6) )) RETURN IF ( LEFT(MIN('Revenue'[DateK...
v-yuta-msft
6 years agoCommunity Support
Mystery ,
You may try modifying the measure as below:
Cumulative SUM =
VAR MAXDATE =
VALUE ( LEFT ( MAX ( 'Date'[DateKey] ), 6 ) )
RETURN
IF (
LEFT ( MIN ( 'Revenue'[DateKey] ), 6 )
<= CALCULATE ( LEFT ( MAX ( 'Date'[DateKey] ), 6 ), ALL ( 'Date' ) ),
CALCULATE (
SUM ( 'Revenue'[ActualCount] ),
ALL ( 'Revenue' ),
VALUE ( LEFT ( 'Revenue'[DateKey], 6 ) ) <= MAXDATE,
'Revenue'[Col] = "ABC"
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Mystery
6 years agoHelper I
Thanks but it doesnt work.