Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a variable that takes the average of a metric (lodgements) for the current month and previous month.
This is the forumla I have so far. I'm not sure why it's not working. Can someone please assist? Thank you.
if(count(DISTINCT [Fin Period]) = 1, (sum({$ <[Fin Period] = {"<=$(vMaxFinPeriodComp)"} - {"<$(vMinFinPeriodComp)"},[Fin Year]=,[Fin Month]=, [Fin Week]=>}$(vLodgements)
vMinFinPeriodComp=
date(AddMonths(max([Fin Period]
),-1),'YYYYMM')
vMaxFinPeriodComp=
Max([Fin Period]
)
Try this
sum({<[Fin Year]=,[Fin Month]=, [Fin Week]=,
[Fin Period]={">=$(=addmonths(monthend(max([Fin Period]))+1,-2)) <=$(=max([Fin Period]))"}>}lodgements)