Karthik Suresh
Karthik Suresh

Reputation: 71

Counting the number each element in a comma seperated column in Tableau

I am new to using Tableau.I want to count the number of times each genre appears in the data set.

In the data set(image attached), I have several genres for one show. I want to count the number of each genre in the data set and display it in Tableau

Data set

Upvotes: 1

Views: 1173

Answers (2)

Vishal Gupta
Vishal Gupta

Reputation: 326

This can be done by an alternative method if you know the distinct list of all genre.

what you need to do is to create a separate calculative field for each Genre using

if contains(Genre,'action') then 1 else 0 end

and then use the Sum of these field as the count of Series per genre.

I know this is a hideous task but, it can be done if you do not have any other option.

Upvotes: 0

Siva
Siva

Reputation: 9101

If you have access to database, then take the dump of data in a excel.

Split the data by , and then create a individual column for every word in the genre column.

Now take the excel as source to tableau, In tableau pivot the splitted columns of Genre.

Go to sheet in tableau, Place the pivot field values in rows and count of pivot field values as measures.

You should be able to see the desired result.

Upvotes: 1

Related Questions