Forum Discussion
tamdo95
5 years agoFrequent Visitor
Running Total with Condition
Hi everyone, I'm creating a measure to calculate a running total with different conditions. Specifically, when Condition 1 is blank, Total should be 0, then Running Total is calculated with the pe...
- 5 years agoTest_Running_Total = CALCULATE(sumx(values(calendar[yearmonth]),if([condition1],[total])),DATESBETWEEN ('Calendar'[Date],DATEADD (NEXTDAY ( LASTDATE( 'Calendar'[Date] ) ),-1* IF (HASONEVALUE ( 'Period'[Period] ),MAX ( 'Period'[Period] ),12),MONTH),MAX( ( 'Calendar'[Date] ))))
wdx223_Daniel
5 years agoCommunity Champion
Test_Running_Total = CALCULATE(sumx(values(calendar[yearmonth]),if([condition1],[total])),DATESBETWEEN (
'Calendar'[Date],
DATEADD (
NEXTDAY ( LASTDATE( 'Calendar'[Date] ) ),
-1
* IF (
HASONEVALUE ( 'Period'[Period] ),
MAX ( 'Period'[Period] ),
12
),
MONTH
),
MAX( ( 'Calendar'[Date] )
)
))