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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data period flag

Good Day!

Need  help for making flag in script to get dynamically some period

i have field with years (...2013,2014)

field with monthName(....Apr,May,Jun)

what must i write in script to make some flag, which will get dynamically period from March this year to October last year?

Thank you!

1 Reply
tresesco
MVP
MVP

May be like:

Load

          Year,

          Month,

          If(Date#(Year&Month,'YYYYMMM')>=Date#('Oct'&(Year(Today())-1), 'MMMYYYY') and

           Date#(Year&Month,'YYYYMMM')>=Date#('Mar'&(Year(Today())), 'MMMYYYY') , 1,0) as Flag

From <>;

This is just an idea. You can make it more dynamic and might have to adjust it accordingly. Hope this helps. Or the same can by done using a preceding load with less complex expression.