2 Replies Latest reply: Dec 21, 2016 5:24 AM by Supriya R RSS

    filter dates according to condition in Qliksense

    Supriya R

      HI,

       

      i need to get latest 30 weeks data for graph, below is code used in script

       

      LOAD

           Date(Date#(Date,'YYYYMMDD'),'DD-MM-YYYY') as [Format Date],

           Dual(Date(WeekStart(Date(Date#(Date,'YYYYMMDD'),'DD-MM-YYYY')),'DD/MM') & '-'

                & Date(WeekEnd(Date(Date#(Date,'YYYYMMDD'),'DD-MM-YYYY')),'DD/MM'), WeekStart(Date(Date#(Date,'YYYYMMDD'),'DD-MM-YYYY'))) as Week,

          Hits;

      SQL SELECT

          Date,

          Hits

      FROM ViewTrafficTable;


      For Graph, Dimension: Week

                       Expression: Sum(Hits)

       

      How could i modify my expression, so i get only latest 30 weeks in graph.

       

      I tried setting Fixed number = 30, in limitation. Yes it shows 30 weeks data, but not latest.