Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using a set analysis expression and my data is a Month to Date Data. I want to calculate the YTD up to the current month my date format is 'YYYYMM'
I have tried the following :
sum({$<CalendarYear = {$(=Max(CalendarYear)-1)},CalendarMonthName={"<=$(vMonthToday()"}>} Sales)
where vMonth is my variable defined as Month(Today()).
Can anyone please help.
If this is working for you
sum({$<CalendarYear = {$(=Max(CalendarYear)-1)},CalendarMonthName={"<=$(vMonthToday()"}>} Sales)
Then, YTD may be this?
Sum({<Year=, Month=, Quarter=, Week=, CalendarYear={">=$(=Num(YearStart(Max(CalendarYear))))<=$(vMonthToday)"}>} Sales)
But, If you ask please share YTD formula for that expression i would write like below
Sum({<Year=, Month=, Quarter=, Week=, CalendarYear={">=$(=Num(YearStart(Max(DateField))))<=$(=Num(Max(DateField)))"}>} Sales)
NO my original expression is not working that is why I posted it
may be this for current YTD
sum({$<Date={"<=$(=date(today(),'YYYYMM'))>=$(=date(yearStart(today()),'YYYYMM'))"}>} Sales)
May be try this?
sum({$<CalendarYear = {">= $(=Date(Max(CalendarYear),'YYYYMM')-1) <=$(=Date(Month(Today()),'YYYYMM'))"}>} Sales)
Sorry doesn't work
=sum({$<CalendarYear = {">= $(=Date(Max(CalendarYear),'YYYYMM')-1) <=$(=Date(Month(Today()),'YYYYMM'))"}>} Sales)
We are in June right now, So I would like to compare June /2017 and June 2016,