Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a date field in my data like
OrderDate
20-06-2016
.......to
02-03-2018 [till date]
I want to create a variables like below. to calculate sum(sales) for last fiscal year and current fiscal year
my fiscal year is- Aprl-to Mar
vCurrentYear=
vLastYear=
vFiscalYear=
vLast10Months=
vLast18Months=
how to create this?
Thanks
Sony
Have you created the Calender from OrderDate ? If not ,then first create the calender. Go through the above link provided by @KALYAN KRISHNA. then
vCurrentYear= Year(Max(Year))
vLastYear=Year(Max(Year))-1
vFiscalYear= Max(FisCalYear) // You have to calculate in Load Script
vLast10Months= >=$(=Min({<Year={'$(=Max(Year)-1)'}>}DATE)) <=$(=AddMonths(Max(DATE),-10))
vLast18Months= >=$(=Min({<Year={'$(=Max(Year)-1)'}>}DATE)) <=$(=AddMonths(Max(DATE),-18))
Have you created the Calender from OrderDate ? If not ,then first create the calender. Go through the above link provided by @KALYAN KRISHNA. then
vCurrentYear= Year(Max(Year))
vLastYear=Year(Max(Year))-1
vFiscalYear= Max(FisCalYear) // You have to calculate in Load Script
vLast10Months= >=$(=Min({<Year={'$(=Max(Year)-1)'}>}DATE)) <=$(=AddMonths(Max(DATE),-10))
vLast18Months= >=$(=Min({<Year={'$(=Max(Year)-1)'}>}DATE)) <=$(=AddMonths(Max(DATE),-18))