1 Reply Latest reply: Jul 6, 2018 5:13 PM by Jerry Jackson RSS

    Distinct Year from Date column or Year in for each loop to current date

    vidya sagar malla

      Hi,

       

      I want to create a Year drop down in my QLIK SENSE report. I got two options

       

      1. In my QVD I have a Date column called "Period". Now I want to select only Distinct Year from that column. But I am not able find the right logic. This is what I wrote but the out put count is showing 1million records.

       

      YearTable:
      LOAD
          distinct year(PERDT)as "Year"
      FROM [lib://GPG_QVD/BrightScope\SI_AUM_GlobalFunds.qvd]
      (qvd);
      

       

       

      2. Or I want to create a for each loop in a inline table from the year 2006 to current year.

       

      Example: for (i=2006, i<=year(timestamp),i++){}
      

       

       

      Can some one please guide me in the right direction.

       

      Thanks,

      -Vidya