Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
i have to show Max Month Sales, previous month sale and previous to previous month sales.
i created 3 variables
vMaxMonth = max(Month) /// month value are in number
vlastMonth = Max(Month)-1
vlast2lastMonth = Max(Month)-2
now i am using variable in this way.
=sum({< Month = {$(vMaxMonth)}>}sales
=sum({< Month = {$(vlastMonth )}>}sales
please correct me it is not working
Hi
Try this but make sure your Date have same format
sum({<Date = {'>=$(=MonthStart(Max(Date), -3))<=$(=MonthEnd(Max(Date)-1))'},Year=,Month=>}Sale)
Hi Abhay,
note that your Month-Field is dual with e.g. a text "Feb" and a number "2".
When using it in Set Analysis you can write {Jan,Feb} or {'<3'}. Both with the same result.
Therefore you need to convert the result of your Variables into the text again like this:
=month(date#(max(Month),'MM')) or =month(makedate(2000,max(Month),1))
or alternatively you can write your set Statement like this:
=sum({<Month={'<=$(vMaxDate)>=$(vMaxDate)}>}sales)
Hope this helps
Tobias