2 Replies Latest reply on Feb 10, 2017 2:42 AM by kristoffer.solberg

    Tableau wraps count() in AGG() and gives different number

    kristoffer.solberg

      So I'm doing an analysis on some customers. They all have uniqe IDs, but some of them have multiple rows in my dataset.

      In one of the sheets i notice that the numbers seem a little off, and that Tableau has wrapped my count(customerid) and countd(customerid) in AGG()-functions. I have no other measures added to filters or axes. So i add a "regular" count() to compare, both for customerid and another measure, area (which i know exists for all rows). I also add SUM(number of records) to be sure.

       

      Now i have:

       

      COUNT(customerid)=402

      COUNTD(customerid)=351

       

      COUNT(area)=402

      SUM(number of records))=402

       

      AGG(COUNT(customerid))=325

      AGG(COUNTD(customerid))=296

       

      When i try to type the last two manually to add them again, Tableau gives me a red error pill, but I can easily copy the existing ones an get valid calculations.

      I don't understand how Tableau aggregates these measures, and how they can give completely different totals, since I have no other calculations or measures that should be interfering. Any ideas here?