5 Replies Latest reply: Jun 5, 2015 5:09 PM by Олег Савельев RSS

    How to count duplicated data without using distinct

    Darri Hilmarsson

      Hi, Qlikview community

       

      I have one problem that I need help to solve.

      I want to count the amount of differenct Document Numbers. It should be pretty easy but that is a twist.

      The Document Number can have the same for difference Company Code.

      So I have one document number 52001186 for company code 1100 and the same document number for company code 1000.

      Which means that I can't use DISTINCT.

       

      When I use DISTINCT I get total of one document number.

      I want the answer to be 2 because this is two company codes. 

       

      Any ideas?

       

       

         

      Vendor NameCompany Code          Document             Number
      -110052001186
      -110052001186
      -110052001186
      -110052001186
      IKEA110052001186
      -100052001186
      -100052001186
      -100052001186
      Nestle100052001186

       

       

      regards Darri