2 Replies Latest reply: Aug 7, 2018 5:30 AM by Dinesh Kumar RSS

    Need to change date filter based on the List Box Selection

    Dinesh Kumar

      Hi Qlik Experts,

       

      We came across the below scenario, kindly help us to implement this logic.

       

      We are having one list box selection with the following values like

      PreviousDay,Last3Days,Last7Days,Last15Days,Last30Days,MTD,YTD,QTD ...etc

       

      Also we are having one filter pane with the Date Field as a filter.

       

      When the user clicks the MTD Filter, the entire report should filter only for the MTD Selection.

       

      Please help us in achieving this. Also kindly share any expressions to relate the filter and the list box selection.

       

      Thanks in advance..!

       

      Thanks,

      Dinesh

        • Re: Need to change date filter based on the List Box Selection
          Arvind Patil

          Hi Dinesh,

          Please create inline table  like below:

           

          DATEFILTER:

          Load * Inline [

          _DATEFLAG

          PreviousDay

          Last3Days

          Last7Days

          Last15Days

          Last30Days

          MTD

          YTD

          QTD];


          Write expression like  if(_DATEFLAG=PreviousDay, Datte= max Date()-1......

           


          Thanks,

          Arvind Patil

            • Re: Need to change date filter based on the List Box Selection
              Dinesh Kumar

              Hi Arvind,

               

              Thanks for your reply.

              As mentioned i already created an inline table for the list box and wrote the expression for the Dynamic Date filter.

              but when i selected the list box, date filter is not refreshing automatically and also the values in the dynamic date filter also not showing properly, it is showing something in integer.

              Please guide me if i did anything wrong.

               

              Below is the expression I used for my Dynamic date filter.

              =if([%Period_Type]='PD', Date=Date(Num(Today()-1)),

              Date)

               

              Below is my ListBox and Dynamic Date Filter:

              ListBox_DateFilter_Screenshot.JPG

               

              Thanks,

              Dinesh