You have you work in excel file or source file like below.
Name Hobby James Tennis James Football Peter Basketball Peter Tennis Peter Football Joseph Football ….. All user and Corresponding Hobbies
thanks for the quick answer.
In the real scenario, I get the info from a data base, and there each user has one unique field Hobby, where all the hobbies come separated by comma.
On Tableau I break this field into 3 calculated fields: Hobby#1, Hobby#2, Hobby#3.
So it is not possible to prepare the table in the way you mention on the datasource.
Is it the only way to do it?
Or would it be possible to get what I need managing the data in Tableau directly?
Thanks in advance,
Venkat is correct that your data needs to be reshaped to work with it effectively in Tableau. However, there may be workarounds to get you there.
1. What database are you using? You may be able to split and pivot the data.
2. Are there a standard group of hobbies, or is it a free-form text field?
3. How many hobbies total are there?
I think its little bit complicated, I think there are lot of calculations need to be done.
May be we need to use String Calculations, I dont think that is a good Idea in creating for each Individual.
thanks all for the answers.
What I am looking is something like this:
I want to show for each user, all the hobbies, but it seems that it is not possible with the data as it is on the database now.
So we will figure out how to prepare the data at the data base level.
My problem now, is that each user has a list of hobbies, but one of the hobbies is the Main Hobby.
Preparing the data like it was recommended before I have this:
And the issue, is that I want to make a second Pie Chart representing the different Hobbies, but counting only ONE row per user.
I mean, I do not know how to create a calculated field that from the field of the table Main Hobby, counts:
- Tennis = 2 (the main hobby for James and Marie)
- Football = 2 (the main hobby for Peter and Josehp)
- Bike =1 (the main role for Laura)
- Boxing = 1 (the main role for Conor)
What I get if I use the Number of Records for the Main Hobby column , is:
Tennis = 4
Football = 4
Bike = 1
Boxing = 3
But I do not want that behavior, I want to count only one entry per user.
Could anyone help me with that?
Thanks a lot in advance!