Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: 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,
...