2 Replies Latest reply: Jan 4, 2018 11:38 AM by Xavier HEMELAAR RSS

    Find number of occurence in several fields

    Xavier HEMELAAR

      Hi Qlikers,

       

      I would like to find a way to count how many time I find a specific value in several fields. My table looks like this

       

      LOAD

      ID,

      A,

      B,

      C,

      D,

      etc ...

       

      Resident MyData;

       

      How can I calculate how many time I find for each ID (unique in my table) how many time I find value 'x' in dimenssion A, B, C, D, etc...

      For information, I have more than 200 fields so I try to find and easy way instead of doing something like :

           if(A like '*x*',1,0)  +   if(B like '*x*',1,0)  +   if(C like '*x*',1,0)  + etc....

      Also, one last thing, 'x' is unique in each dimenssion.


      Thanks for your help.