1 Reply Latest reply on Jul 7, 2013 12:19 AM by Andrew Ball

    Help: Tableau returning incorrect sum/count values

    Zafar Jafri

      Hi there,

       

      I pushed my data from a CSV file into Tableau.  For some reason Tableau is returning a Sum/Count value for a chosen column (Amt) that is incorrect.  What is even more intriguing is when I open up the underlying data in Tableau, it still reflects the correct data - meaning Tableau is somehow misinterpreting the data.  See below for a clear example of this contradiction.  Tableau shows that the actual underlying data has a count of 711,205 rows, but only returns 710,339 count for the amount.  I tripled check and this isn't because there are fewer values in the AMT column - there are 711,205 values in the underlying data!

       

       

      Untitled.png

      I investigated further and it looks like Tableau has inserted blank spaces into certain rows for the value (Amt) where those rows originally had actual values.  Why would ol faithful Tableau be doing this?

       

      Thanks

        • 1. Re: Help: Tableau returning incorrect sum/count values
          Andrew Ball

          Hi Zafar,

           

          The Count expression counts the number of non-null rows. If that and the "Number of Rows" field give different amounts, it is because (as you found out) you have a number of nulls in your data - 866 in your case.

           

          When using data from a CSV, Tableau uses a number of rows to determine the field type. Once determined, it uses that type for that field. If it has determined "Amount" is a number, then if there are any strings, it will attempt to turn them into numbers. However, if it cannot do so, you get a NULL record instead.

          If you change the field type inside Tableau to be a string, you will still have NULL, as this is a further type change on top of the original, so you will need to use other fields to determine which rows to look at in your dataset.

           

          Have a look through the CSV. I am guessing that there is something in the amount column that is not a true number - perhaps a currency sign?

           

          Hope this helps,

           

          Andrew

          1 of 1 people found this helpful