Skip to main content

Dear,

I am count distinct Customer ID based on the Category filter.

 

To check that again, I used Excel to filter the category and then remove the duplicates of Customer ID.

In excel, I just got the total of different Customer ID is: 4873. and Tableau also give the total different Customer ID is 4873.

When I put Category into Row or Filter in Tableau, the result is total different. it is much more higher and unreliable data

 

Final Results are different between Tableau and Excel

Screenshot+2019-06-21+at+23.23.25.png

Screenshot+2019-06-21+at+23.30.31.png

 

For excel, it gives me the correct data. after I filter the category and remove duplicate in CustomerID.

1492 furniture

2847 Office Supply

534 Technology

here are the results.

 

Actually, I also used Tableau to calculate the total of Customer each, it was different from the result my boss had, so I was so confused right now, what's wrong here.I cannot share real data, just for example similar to what I actual calculate in my data.

 

Please help me, I attached the file of superstore here.

 

Thank you so much.

9 respuestas
  1. 22 jun 2019, 6:08

    Hi Thoa,

     

    I agree with Ken, It does sound as error in Excel. 

     

    You see the difference in results when you added Category, because Tableau is counting distinct number of Customer ID at the level you specified. When there is no breakdown by category, Tableau counts a unique number of customers in the entire database. Once you break it by category, Tableau counts a unique number of customers in each category. It means that some customers placed orders in different categories. For example, if Customer #1 purchased furniture and office supplies, this customer will be counted as unique only once if there is no Category on a row shelf, but will be counted 2 times (once per each category) after Category added.

     

    To keep it fixed at Category level, you can use LOD formula as CustomerCount = { FIXED [Category]: COUNTD([Customer ID])} and replace CNTD(Customer ID) with CustomerCount on a row shelf. This way, if you remove Category from the shelf, it will count the number of customers as Furniture Unique Customers+Office Supplies Unique Customers+Technology Unique Customers.

     

    Hope that helps.

     

    Tanya

0/9000