Forum Discussion
Bokazoit
Continued Contributor
5 years agoAccumulate quarters
This meaure works well for month but as soon as I drill to quarter it gives me accumulated up till last quarter i.e. Q1. I need it to show for Q2 also even though it is not finished yet: acc = ...
daxer-almighty
Solution Sage
5 years agoacc =
VAR Today_ = TODAY ()
var EffectiveDates =
INTERSECT(
DISTINCT( DimDato[Dato] ),
CALCULATETABLE(
DISTINCT( DimDato[Dato] ),
DimDato[Dato] <= Today_,
REMOVEFILTERS( DimDato )
)
)
VAR RTotal =
CALCULATE (
SUM ( FactFinans[#Bogførtbeløb] ),
CALCULATETABLE(
DATESYTD( DimDato[Dato] ),
EffectiveDates
),
REMOVEFILTERS( DimDato )
)
return
RTotal