3 Replies Latest reply: Mar 3, 2010 11:25 AM by Miguel Angel Baeyens de Arce RSS

    Reporting based on selected Dates

      I am very new to Qlikview so please forgive me if this has been covered a million times already.

      I am struggling to see how I can implement a simple calendar date picker on the screen that will allow the end user to select a Date range which will then return all the records that have their "openeddate" field between those dates.

      I have run through the Developer course, and in part I, there is a nice section on Autogenerating a table of Calendar dates that range between the minimum and maximum date range covered by my records.

       

      My issue is that I cannot see how to set the report up so that a user selects a start and end date that the data is then filtered on.

       

      Can anyone point me in the right direction?

      Also - Is the normal Calendar/slider object the only available object to do this? It seems a bit bizarre to have a drop down list of every single date in the autogenerated table. Is it not possible to have a text box beside the calendar button so people can either type in the date or choose the date from the actual pop up calendar?

        • Reporting based on selected Dates
          Miguel Angel Baeyens de Arce

          Hello,

          First, the slider/calendar object does have that pop up calendar (you will see an icon next to the right side of the listbox) so configured properly will allow you to select only one value or multiple values, in the properties of the object. You also have Inpuboxes you can store in variables and then make selections based on that, but basically is the same thing.

          Second I'd recommend you to create a master calendar as it is explained in the developer course, so you will have all your values in that table and the user will be able to select any of the dates.

          Regards.

           

            • Reporting based on selected Dates

              Hi Miguel, Thanks for the swift response.

              I have already created the Master Calendar and understand that ok.
              I know that the slider/calendar object has the pop up, but what I was wondering was is it possible to have a Text Box for inputing the value of the startdate variable for example, as well as having the calendar Pop up beside that which can populate the text box? The drop downlist of all dates in the master calendar is a bit unweildy.

              Lastly - How do I filter the data on the selected dates?
              Do you use the ID of the object that is selecting the date in the LOAD statement?

              Something like:


              LET vDate1 = SL01;
              LET vDate2 = SL01;

               

               



               

              Test_table:



              Load
              ENQUIRY AS ENQUIRY_ID,
              OPENEDDATE,
              ENQUIRYTYPE,
              ALT_ADDR,
              UPRN,
              STREET_NO

              Where OPENEDDATE >= $(vDate1) AND OPENEDDATE <= $(vDate2);
              Select * FROM CORPDEV."CTS_ENQUIRY_SUMMARY"
              ;

               

               

              Where SL01 and SL02 are the ID's of the two slider/calendar options.



                • Reporting based on selected Dates
                  Miguel Angel Baeyens de Arce

                  Hi,

                  You needn't set the variables in the script, although you can do that. Anyway, you will populate those variables from the calendar object itself. Right click properties -> General tab -> Data -> Variable. That means the value you select will be stored dynamically in that variable. This way is out of the script, once you have loaded data.

                  If what you are looking for is how to filter loading from date to date, there is no other way that to set manually those dates, either in variables or in literals, depending on how are you loading (directly from your datasource, as in your example).