7 Replies Latest reply on May 7, 2018 1:09 PM by Jim Dehner

Create a Pie Chart using based on a unique count of string values

Hello,

I have been trying to create a pie chart based on a unique count of our vendors, broken out into different categories. Each vendor can have multiple categories, however I only want each vendor counted once, and for it to be counted in the category it has the highest spend in.

See data below:

Based on the data above, I should get a pie with the following results:

Category          Unique Count

Goodbye               3

Hello                     1

For Logan, it selected "goodbye" because that is the category that it had the highest spend in.

Is there a formula for this? Any help would be greatly appreciated.

Thanks,

Logan

• 1. Re: Create a Pie Chart using based on a unique count of string values

can you attach this excel.  it will help me to get this data in the tableau and try some calculations.

• 2. Re: Create a Pie Chart using based on a unique count of string values

See attached, thanks for trying to help me out.

• 3. Re: Create a Pie Chart using based on a unique count of string values

I used fixed LOD for this . Please see attached workbook in tableau 10.4.

Let me know, if you have any question.

First, i created below calculation

{ FIXED [Vendor] : MAX([Spend])}

Then I created a second calculation using this. As shown in below screenshot

• 4. Re: Create a Pie Chart using based on a unique count of string values

It worked! Thank you so much for your help!!

• 5. Re: Create a Pie Chart using based on a unique count of string values

I broke it into pieces - first the max spend  by vendor

then the category

finally the count

returns this

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• 6. Re: Create a Pie Chart using based on a unique count of string values

Interesting approach, thank you for the quick response.

• 7. Re: Create a Pie Chart using based on a unique count of string values

Let me know if you find another that works

Jim

Thanks