Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i have built a LastMonthFlag and it correctly grabs April, but i only want it to grab April of the current year. How do i achieve this? It is currently grabbing April for every year in my dataset. My code is below.
IF(Month(datefield) = Month(now())-1,1,0) as LastMonthFlag
Please help me achieve this, thank you!
IF(MontStart(datefield) = MonthStart(now(),-1),1,0) as LastMonthFlag
cheers
Can you try using monthname function
IF(MontStart(datefield) = MonthStart(now(),-1),1,0) as LastMonthFlag
cheers