14 Replies Latest reply: Jan 25, 2018 10:25 AM by Xavier HEMELAAR RSS

    Count number of old/new ID

    Xavier HEMELAAR

      Hi Qlikers,

       

      I would like to calculate how many old/new ID I have between two dates. What I tried is :

      count(distinct(if(Extract_Date = 'MAX DATE', ID)) - count(distinct(if(Extract_Date = 'MIN DATE', ID)) . But this doesn't work for a table like this :


        

      MIN DATEAcount(distinct(if(Extract_Date = MIN 'DATE', ID)) = 8
      MIN DATEB
      MIN DATEC
      MIN DATED
      MIN DATEE
      MIN DATEF
      MIN DATEG
      MIN DATEH
      MAX DATEAcount(distinct(if(Extract_Date = MAX 'DATE', ID)) = 6
      MAX DATEB
      MAX DATEC
      MAX DATEI
      MAX DATEJ
      MAX DATEK

       

      The result I would like is to find 5 old ID (D,E,F,G,H) in my MIN DATE and 3 new ID (I,J,K) in my MAX DATE. If someone has and idea without doing anything in the script. Just in the visualisation console.

       

      Thanks for your help