7 Replies Latest reply: Aug 26, 2016 2:27 AM by Ravi Krishna Reddy Chinta RSS

    How to create Date Picker in Qlik Sense

    Ravi Krishna Reddy Chinta

      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.

        • Re: How to create Date Picker in Qlik Sense
          deepali more

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

            • Re: How to create Date Picker in Qlik Sense
              Ravi Krishna Reddy Chinta

              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

            • Re: How to create Date Picker in Qlik Sense
              Kevin Case

              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

                • Re: How to create Date Picker in Qlik Sense
                  Ravi Krishna Reddy Chinta

                  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

                • Re: How to create Date Picker in Qlik Sense
                  Lech Miszkiewicz

                  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