Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vinayvishwanath
Contributor III
Contributor III

Hows to restrict data between start and end dates

Hi All,

I want to know on how to restrict the data between start and end dates.

I have 3 fields in data 1. Applications 2. Start date 3. End Date.... the date is in the format of 2017Q1, 2017Q2, 2017Q3...... etc. Start dates start from 2016, 2017,2018 onwards and end dates close with 2017,2018,2019... I want to restrict the data using a filter wherein there should be selection as inprogress,yet to start and expired. here inprogress means end date of app is future date and expired means end date has already passed.Yet to start means apps which have future start date.

Could someone please help me with the script to be used for the above issue

Thanks

Vinay

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Are you looking for something like:

LOAD *,

    If([Start date] > Today(), 'Yet to start',

    If([End date] > Today(), 'In progress', 'Expired')) as Status

;

LOAD

    Application,

    [Start date],

    [End date],

    ...

   

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vinayvishwanath
Contributor III
Contributor III
Author

Hi Jonathan,

thanks for the reply, but the solution is not working and i can see though only one status "Yet to start", but upon selection it's not working

jonathandienst
Partner - Champion III
Partner - Champion III

Are your date fields proper numeric Qliksense dates? This won't work if you have loaded dates as text strings.

Why don’t my dates work?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vinayvishwanath
Contributor III
Contributor III
Author

Hi Jonathan,

Your solution worked after creating a resident table for the same