1 of 1 people found this helpful
I am trying to understand what you want
you have something like this?
and want it to look more like this?
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.
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.
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
Hi, sure, please if you can check the data below in my reply to Jim, it would be great. Thanks
your going to need to transform your data. Do you have access to any data manipulation tools? such as R?
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.
1 of 1 people found this helpful
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
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!