Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
drohm002
Creator II
Creator II

if statement with last month

Hi, I have a field called AMS_DATE, I want to create a field inside of my script that returns a value of '1' if AMS_DATE occurred last month.  Please help!

1 Reply
edwin
Master II
Master II

in your load statement add this (make sure AMSDATE is a date

load ...
if(monthstart(AMS_DATE) = addmonths(monthstart(today()),-1),1)  as YOURFLAG,
...