Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to do a sum of months less than the current month/year:
Sum({<[CalendarDate.autoCalendar.YearMonth] =- { '$( =$(vCurrMonthYear) )' }>}Total)
vCurrMonthYear = MonthName(addmonths(today(),-1))
This does not work. Any other ideas?
Got it:
Sum({$<CalendarDate = { "$(='<' & $(vCurrMonthYear))" }>}Total)
vCurrMonthYear = num(MonthName(addmonths(today(),0)))
Which format are your variable output and your calendar field? Are they the same?
They are the same.
Could you double check?
Yes. I did check. They match both are formatted "MMM YYYY"
Should I use a different format? I tried num() but couldnt get the less than to work. Do you know how to do that?
Something like this:
vCurrMonthYear = num(MonthName(addmonths(today(),-1)))
Not sure where to put the <..
Sum({<CalendarDate =- { '$( =$(vCurrMonthYear) )' }>}Total)
CalendarDate is already the min number of each month.
Got it:
Sum({$<CalendarDate = { "$(='<' & $(vCurrMonthYear))" }>}Total)
vCurrMonthYear = num(MonthName(addmonths(today(),0)))