Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Currently I have this for a master item used in a bar graph that has a three year interval as defined by the variables:
sum({<
Year=,
Month=,
[%DateKey] = {">=$(vRollingStart)<=$(vRollingEnd)"}
>}[Invoice Revenue] * [FX]
)
I would like to have the "vRollingStart" lock in a date that is at the beginning of the closed Year-Quarter currently defined as:
=Date(MonthStart(AddMonths(Max([Calendar Date]),-35)),'MM/DD/YYYY')
vRollingEnd is:
=Date(MonthEnd(Max([Calendar Date])),'MM/DD/YYYY')
It would be nice to have this go to the nearest last full quarter as well.
Any ideas on how to accomplish this with either changing the variable(s) or master item?
Hi
quarterstart() and quarterend() may be usefull here
quarterstart(today()) will give you 01/07/2024
for previous quarter it will be quarterstart(today(),-1) = 01/04/2024
same logic with quarterend() function :
current quarter date end quarterend(today())
previous quarter date end quarterend(today(),-1)
hope it helps
Hi
quarterstart() and quarterend() may be usefull here
quarterstart(today()) will give you 01/07/2024
for previous quarter it will be quarterstart(today(),-1) = 01/04/2024
same logic with quarterend() function :
current quarter date end quarterend(today())
previous quarter date end quarterend(today(),-1)
hope it helps
Hi Brunobertels,
Yes quarterstart(), is ultimately what worked for me! I used QuarterStart(AddMonths(Max([Calendar Date]), -36)) for vRollingStart and QuarterEnd(AddMonths(Max([Calendar Date]), -3)) for vRolling end, and the visulaization locked in place. Thank you for confirming.