-
1. Re: Formatting - Put vertical stack-charts side by side
Jim DehnerOct 10, 2018 1:09 PM (in response to Guilherme Lopes)
1 of 1 people found this helpfulI am trying to understand what you want
you have something like this?
and want it to look more like 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.
-
2. Re: Formatting - Put vertical stack-charts side by side
ShivaRam Chennapragada Oct 10, 2018 1:10 PM (in response to Guilherme Lopes)You might need to pivot your data. Could you mock up some data and attach a packaged workbook?
In the stacked bar chart below, each bar represents a 'Year' coming from a Year dimension. Each stack represents a 'Region' which comes from Region dimension. Both these are plotted against 'Income' measure.
-
3. Re: Formatting - Put vertical stack-charts side by side
Guilherme Lopes Oct 10, 2018 1:14 PM (in response to Jim Dehner) -
4. Re: Formatting - Put vertical stack-charts side by side
Jim DehnerOct 10, 2018 2:54 PM (in response to Guilherme Lopes)
1 of 1 people found this helpful -
5. Re: Formatting - Put vertical stack-charts side by side
Guilherme Lopes Oct 10, 2018 3:29 PM (in response to Jim Dehner)Hi Jim, thanks again for taking the time to answer. However, unfortunately it is not that simple.
Here is a sample of my database.
Context: clients were asked which activity they prefer. They were supposed to rank their top-5 preferences. The numbers in the database are the rank position of each activity that each client have chosen. since they could rank only 5 activities and there are more than 20 activities, some activities do not get ranked for a given client.
My goal: For each activity, I want to have a stack graph, with the total number of mentions and with the percentage of rank positions (illustrative example: Activity A mentioned 30 times, being: 20% of times ranked as 1st option, 40% of the times ranked as 2nd option, etc).
I have managed to build the stacks for each activity, however, they appear as I showed in the picture that I have shared before. And I want the stacks to be side by side.
Does that make sense?
ClientID Activity A Activity B Activity C Activity D Activity E Activity F Activity G Activity H Activity I Activity J Activity K Activity L Activity M Activity N Activity O Activity P Activity Q Activity R Activity S Activity T Activity U Activity V Activity W Activity X Activity Y Activity Z Activity AA 1000 2 1 3 1001 1 3 2 1002 2 3 4 1 1003 2 1 1004 1 3 2 1005 2 3 1 4 5 1006 1 2 5 3 4 1007 3 2 4 1 1008 5 1 3 2 4 1009 4 3 5 1 2 1010 2 4 1 5 3 1011 5 3 4 1 2 1012 2 3 1 4 5 1013 1 2 3 4 5 1014 4 1 3 2 1015 5 3 4 2 1 1016 5 1 2 3 4 1017 5 3 1 2 4 1018 1 5 3 2 4 1019 2 1 3 4 5 -
6. Re: Formatting - Put vertical stack-charts side by side
Guilherme Lopes Oct 10, 2018 3:30 PM (in response to ShivaRam Chennapragada)Hi, sure, please if you can check the data below in my reply to Jim, it would be great. Thanks
-
7. Re: Formatting - Put vertical stack-charts side by side
marc de Latour Oct 10, 2018 3:38 PM (in response to Guilherme Lopes)Guilherme,
your going to need to transform your data. Do you have access to any data manipulation tools? such as R?
-
8. Re: Formatting - Put vertical stack-charts side by side
Guilherme Lopes Oct 10, 2018 3:50 PM (in response to marc de Latour)Yes, I do have Alteryx and Excel and could transform my data.
I will add this chart as part of an interactive dashboard, this is why I was trying to do everything on Tableau, because I want to se demographic information of clients as filters.
If I transform the data outside of Tableau into a table ready to plot this output format on Tableau, I am afraid I will loose the flexibility of interacting on my dashboard.
Thanks
-
9. Re: Formatting - Put vertical stack-charts side by side
Jim DehnerOct 11, 2018 4:27 AM (in response to Guilherme Lopes)
1 of 1 people found this helpfulhi
thanks for sharing your data - this is why we ask for your twbx workbook with the data - it saves time and gets you an answer quicker -
you can use alterex or prep- or simply pivot your data Pivot Data from Columns to Rows to restructure it into a directly usable form
Jim
-
10. Re: Formatting - Put vertical stack-charts side by side
ShivaRam Chennapragada Oct 11, 2018 5:30 AM (in response to Guilherme Lopes)Hi, to my previous suggestion and as others pointed out, your data needs to be restructured. As Jim mentioned, pivoting (within the Tableau Desktop application) is the simplest way to do this, more advanced tools like Prep or Alteryx can help you better. Good luck!