What type of data source are you using? If you are using a local file data source such as Excel, Access, or Text Files you only have the ability to aggregate a field using Count. However, if you extract the data you can aggregate using Count (Distinct).
You can create a Tableau Data Extract by selecting Data > Extract.
I am using Excel. Just gave it a try on the Supplier field and it worked perfectly.
I have never used the Data > Extract feature and didn't even know to look there for the answer.
Thank you very much.
Can anyone comment on trying to do this when the data is coming from a SQL server?
I'm trying to count the number of unique customers within market segments. No matter what I've tried, I can only get the number of transactions by each customer.
Thanks in advance!
So with SQL Server you do not need to do a Data Extract to get the Count(Distinct) function. You should be able to drop your Market Segment field on the Rows shelf. Then drag a field that represents each unique customer (e.g., Customer Name, Customer ID, etc.) to the Columns shelf. Finally, select Count Distinct as the aggregation on the field menu. So if you used Customer Name you will get the number of distinct customer names that are associated with each market segment.
Hope that helps!