Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create Date Picker in Qlik Sense

Hi,

I have created a visualization which has a filter on "Order Date". By default, all the dates are being shown in the visualization and I need to select a date to filter the data. But my requirement is not to show all the dates from database, but to make the user to select date from a date picker calendar and the value should be passed to filter the visualization.

Could anyone have idea on how to do this?

Note: This should work for Qlik Sense 2.1 version.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Deepali,

Thank you for the reply.

I have already tried with SenseDateRangePicker-master, but it is beyond my requirement and it is a bit complex for me to customize the code according to my requirement as I don't have JavaScript knowledge. So I am looking for a single date picker extension, instead of a date picker that has multiple options like today, yesterday, range etc like in the SenseDateRangePicker-master.

Below is my actual requirement.

1) I am displaying sum(sales) for several US regions using a bar chart.

2) I want to add a filter on Order Date field.

3) I should have one filter that should be displayed as a date picker for selecting StartDate and another filter that should be displayed as a date picker for selecting EndDate.

4) I will store these two values in two variables and will use these variables to filter actual visualization.

Thanks,

Ravi

View solution in original post

10 Replies
deepali_more
Creator
Creator

You can use extension to select the date range , attaching here see if it is usefull and fulfilling your requirement..

Anonymous
Not applicable
Author

Hi Deepali,

Thank you for the reply.

I have already tried with SenseDateRangePicker-master, but it is beyond my requirement and it is a bit complex for me to customize the code according to my requirement as I don't have JavaScript knowledge. So I am looking for a single date picker extension, instead of a date picker that has multiple options like today, yesterday, range etc like in the SenseDateRangePicker-master.

Below is my actual requirement.

1) I am displaying sum(sales) for several US regions using a bar chart.

2) I want to add a filter on Order Date field.

3) I should have one filter that should be displayed as a date picker for selecting StartDate and another filter that should be displayed as a date picker for selecting EndDate.

4) I will store these two values in two variables and will use these variables to filter actual visualization.

Thanks,

Ravi

rittermd
Master
Master

In the filter if you click on it you can type in next to the magnifying glass something like

>=01/01/2016<=01/30/2016 and hit enter

It will then filter the dashboard based on this date range.

kevincase
Creator II
Creator II

Ravi,

I had the same requirement and this is what I did.

1.  Create 2 variables:

Set vFromDate = Only(FromDate);

Set vToDate = Only(ToDate);

2.  Load From and to dates:

LET vMin = Num(MakeDate(1999,01,01));
LET vMax = Num(Today()+30);

FromDates:
LOAD Date($(vMin) + RowNo() -1) as FromDate
AutoGenerate 1
While Date($(vMin) + RowNo() -1) < Date($(vMax));

ToDates:
LOAD FromDate as ToDate Resident FromDates;

3.  Use Set Analysis to filter your data:

Sum({1<[Order Date]={">=$(=Date($(vFromDate)))<=$(=Date($(vToDate)))"}>}[Sales])

Hope this helps.

Kevin

Michael_Tarallo
Employee
Employee

Hi Ravi - I agree with Mark as the simplest way to do this - there is an example in this video at the 10 min mark: Understanding the Master Calendar (video)

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Ravi,

there is quite neat extension "FieldUI"

Qlik Branch

Then you can point to your date field and use dropdown option. It has a setting to use "Always one selected value" as well as "Default value"

Depends on amount of data it is better to apply selection on field rather than using variables which will go against current selection. Solutions suggested by other guys will work very well and if you dont want to use extensions they are the best.

Hope this helps

Regards

Lech

2016-08-26_10-31-13.jpg

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Anonymous
Not applicable
Author

Hi Kevin,

Thank you very much. The work around you suggested is working fine and it is what actually I am looking for, but instead of selecting the date from date values I would like to select the date from a date picker calendar graphic. I mean, when I click on the from date filter, it should display a calendar graphic from which I have to choose date, month and year. I heard that this can be achieved by using qWidget extension, but unfortunately I don't have access to download it.

It would be great if you or anyone can grant me access to download qWidget or please send me qWidget as a zip file to my mail id ravi.chinta@yash.com.

Thanks,

Ravi

buffalome90210
Contributor III
Contributor III

Ravi, did you get the information, examples, etc to meet your need ?

Terence

nima94
Contributor III
Contributor III

Hi,

 

Hi should i apply this one ?