Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I am try to compare month versus previous month based on the selected month in calendar filter.
For example, if I select Feb 2022, I would like to have the % difference versus Jan 2022 etc.
At the moment I have the below which work only for current month but not for previous.
Sum({<Year={'$(=Max(Year))'}, Month={'<=$(=Max(Month))'}> + <Year={'<$(=Max(Year))'}, Month=>} GCF)
/
Sum({<Year={'$(=AddYears(Max(Year))-1'}, Month={'<=$(=AddMonths(Max(Month))-1'}> + <Year={'<$(=AddYears(Max(Year))-1'}, Month=>} GCF)
Could you please help?
Thank you!!
Perhaps the easiest way is using Date fields, something like this:
SUM({<[Date]={"<='$(=MonthEnd(Max([Date])))'"},Year=,Month=,YearMonth=>} GCF)/SUM({<[Date]={"<='$(=MonthEnd(AddMonths(Max([Date],-1))))'"},Year=,Month=,YearMonth=>} GCF)
Thank you for the reply and time Mario!
The above is not working as the result is zero. I tried them separately as to test and again there is no result appearing. Seems the YearMonth=> is not working. Any thoughts?