Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Day
Please assist in changing the calculation in order for it to show only the 3 months before the current month:
=if(monthname(LoadDate)>=AddMonths(Max(total Monthname(LoadDate)),-2),Monthname(LoadDate))
currently is shows: Jun'22/May'22/Apr'22
I want it to show: May'22/Apr'22/Mar'22
Thanks in Advance
Kind Regards
=if(LoadDate>=monthstart(LoadDate,-3) and LoadDate<=monthend(LoadDate,-1), Monthname(LoadDate))
OR
=Aggr(Only({<LoadDate={">=monthstart(LoadDate,-3)<=monthend(LoadDate,-1)"}>}LoadDate),LoadDate)
@vinieme12 Hi,
This does not seem to be working.
what i currently have: (i want it to show only from May'22 and back)
With your calculation:
It wasn't clear if you needed this for a dimension or a measure,
measure syntax
=Sum({<LoadDate={">=monthstart(LoadDate,-3)<=monthend(LoadDate,-1)"}>} Sales)
OR
=Sum({<LoadDate={">=$(=Date(monthstart(LoadDate,-3),'DD-MM-YYYY'))<=$(=Date(monthend(LoadDate,-1),'DD-MM-YYYY'))"}>} Sales)
replace DD-MM-YYYY with the date format for LoadDate
Apologies, it's in the Dimensions field: "Bars"
You can restrict calculations in measure too, the output will be same
try below
=Sum({<LoadDate={">=$(=Date(monthstart(LoadDate,-3),'DD-MM-YYYY'))<=$(=Date(monthend(LoadDate,-1),'DD-MM-YYYY'))"}>} Sales)