3 Replies Latest reply: Feb 7, 2018 2:42 AM by Xavier HEMELAAR RSS

    How to identify ID that has informations changed in time and find its most recent sales value

    Xavier HEMELAAR

      Hi Qlikers,

       

      In the table bellow see exemple of data set:

         

      Extract_DateID[Diff.number_of_changes]Sales
      06/01/2018A010
      06/01/2018B820
      06/01/2018C530
      15/01/2018A011
      15/01/2018B322
      15/01/2018C133
      25/01/2018A015
      25/01/2018B025
      25/01/2018C735

       

      Every time I have a new set of data (Extract_Date) I calculate the number of fields that have been changed and put that value in field [Diff.number_of_changes]. Now I want to set KPI that will allow to see how many ID have changed between min date (06/01/2018) and max date (25/01/2018). for this I use expression : count(distinct(if([Diff.number_of_changes]>0,ID))) . And this works fine


      It gets more complicated for me when I want to find the value of Sales at my max date (25/01/2018) only if a change has been made in the past. So for A value returned should be 0, for B 25 and for C 35.


      I hope my explanation is understandable.

       

      Thanks for your help