Forum Discussion
Lodan
1 year agoHelper II
Recurring Revenue Measurement
Hello, I am a bit stuck. The worst thing is I have done this before and it worked so not sure what I am doing wrong now. Effectively for each month I wanted to sum up the revenue for that mo...
- 1 year ago
Lodan Try the following. I believe you used MaxDate twice whereas the second time it should have been MinDate. You also waaaaaay overused CALCULATE.
MRR Revenue NC = VAR MaxDate = MAX( 'Date2'[Date] ) VAR MinDate = MIN( 'Date2'[Date] ) VAR __Table = FILTER( ALL( 'CMD Items' ), [Completed Date] <= MaxDate && [End of Term] > MinDate ) VAR Result = SUMX( __Table, [MRR$] ) RETURN Result - 1 year ago
I think you need to add REMOVEFILTERS( 'Date2' )
MRR Revenue2 = VAR MaxDate = CALCULATE( MAX( 'Date2'[Date] ) ) VAR MinDate = CALCULATE( MIN( 'Date2'[Date] ) ) VAR Result = CALCULATE( SUM( 'CMD Items'[MRR$] ), 'CMD Items'[Completed Date] <= MaxDate, 'CMD Items'[End of Term]> MaxDate, REMOVEFILTERS( 'Date2' ) ) RETURN Result
johnt75
1 year agoSuper User
I think you need to add REMOVEFILTERS( 'Date2' )
MRR Revenue2 =
VAR MaxDate = CALCULATE( MAX( 'Date2'[Date] ) )
VAR MinDate = CALCULATE( MIN( 'Date2'[Date] ) )
VAR Result = CALCULATE(
SUM( 'CMD Items'[MRR$] ),
'CMD Items'[Completed Date] <= MaxDate,
'CMD Items'[End of Term]> MaxDate,
REMOVEFILTERS( 'Date2' )
)
RETURN Result- Lodan1 year agoHelper II
That worked, thanks!