Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

i want to specify Range of date

hi,

i am new in Qlik sense and i a little confusing part as shown below.

1/ i want to specify Range of date in survey date and i am confused where should i create the variable whether in Load script or in app Variable. and what is proper syntax

2/ can i write If Statement (if... then... Else if ...else ... end if ) as new calculated filed in data load editor 

note i am using ODBC connection

5 Replies
dan_sullivan
Creator II
Creator II

I would do it in the load editor.  something similar to this:

IF(SurveyDate < AddMonths(Today()),-6) , '6 months old',

IF( SurveyDate < AddMonths(Today()),-4) , '4 months old',

IF(SurveyDate < AddMonths(Today()),-2) , '2 months old',

IF(SurveyDate < AddMonths(Today())) , '<2 months old')))) as 'Survey Age'

ahaahaaha
Partner - Master
Partner - Master

Hi,

1) I recommend download the data all, and the select of dates produce in the UI

2) You can create a variable in both the script and in UI. To create a script, use LET and  SET.

Let ‒ Qlik Sense

Set ‒ Qlik Sense

Working with variables in the data load editor ‒ Qlik Sense

3) When downloading the script, you can use any calculations. But it is better to transfer all the selections in UI..

Regards,

Andrey

ahaahaaha
Partner - Master
Partner - Master

At attached file examle of implementation for sript variables and UI variables.

Anonymous
Not applicable
Author

can you please provide a link for lab tutorial ?

ahaahaaha
Partner - Master
Partner - Master

Unfortunately, I do not have a manual for lab tutorial. Here is a link on which you can download a lot of useful, albeit partially obsolete material

Downloadable guides ‒ Qlik Sense

The most actual material for Qlik Sense is located here

Home ‒ Qlik Sense

Regards,

Andrey