8 Replies Latest reply: Sep 7, 2018 4:11 AM by Muhammad Hazim Muhammad Alif RSS

    Filter Rank By date

    Muhammad Hazim Muhammad Alif

      Hello Qlik Community!


      Below is my output


      Qlik community 9.jpg

      My current problem is i need to sort the rank based on the date. Currently. The rank on 31/05 is accumulated from the rank on 30/04


      Below is my current script




          [Total Complaint Received],


          if([Total Complaint Received] = 0 , 1,

          if([Total Complaint Received] = Previous([Total Complaint Received]) and Previous([Date]) = [Date],


          RecNo())) as Rank,

      Resident MainComplaint

      Order By [Date],[Total Complaint Received] ;


      Can anyone help me solve this problem?


      Thank you in advance!