The data will update every month end. Here i need to generate 2 flags in back end. one is Last month and another is Last 6th month Sales. For that i created below flag in script.
IF(Month(Date(Date))=Month(Today())-6,'Y') as Last_6th_Month, IF(Month(Date(Date))=Month(Today())-1,'Y') as Last_Month
My script worked till last month in 2019 but it is not working from this year. Because my condition is based on Today() and at that there is only one year data 2019. How to resolve this issue to get sales last month and Last 6th month.