-
1. Re: Percentage of Total
Kent Sloan Jan 21, 2016 12:39 PM (in response to margaret.tanutama)Hi Margaret,
The real key to making this work is setting the data structure up in a way that Tableau can make the most use of. Below is an example of what I have set up in Tableau to mimic what you are looking for and the data structure I used to underneath. Attached is the workbook where you can go through the table calculations used to calculate the percentages. I hope this helps.
Thanks,
Kent
Data Structure
-
Percent of Total Example.twbx 33.2 KB
-
-
2. Re: Percentage of Total
margaret.tanutama Jan 21, 2016 12:49 PM (in response to Kent Sloan)Kent, thank you. Do you have the attached workbook?
-
-
4. Re: Percentage of Total
margaret.tanutama Jan 21, 2016 1:40 PM (in response to Kent Sloan)I see. From inbox, I can't see the attached WB. I can see it by going to "Your View". Thanks!
-
5. Re: Percentage of Total
Kent Sloan Jan 21, 2016 1:44 PM (in response to margaret.tanutama)No problem. For a second you made me think I forgot to attach the workbook.
-
6. Re: Percentage of Total
margaret.tanutama Jan 21, 2016 3:26 PM (in response to Kent Sloan)Hi Kent,
For the data structure you have shown, questions:
How do I get the sum (Number of Records) to be the sum (Values)?
How do I get the name and items columns to disappear?
Is one of the purpose of dashboard to combine what you did? Can these calculations be done on the same page?
Also, the week values in my original data source comes in columns, not rows. Is there a way to do the same?
Thank you.
Best Regards,
Margaret
-
7. Re: Percentage of Total
Kent Sloan Jan 22, 2016 7:42 AM (in response to margaret.tanutama)Hi Margaret,
To replace sum of records with the sum of values drag the values field and drop it on top of SUM(Number of Records) in the measure values card.
To hide the name and item headers right click on pill on the columns shelf and uncheck show header.
The dashboard is used to place the two views into one space. You could likely fit these into the same table using the method described in this blog post to create what looks like a table but I think it would become much more work than it would be worth.
https://www.interworks.com/blog/ksloan/2015/01/07/row-level-highlighting-tableau
I would highly recommend restructuring your data to list the weeks in a single column. If you are not able to do this before importing to Tableau you can pivot the data after bringing it into Tableau in the Data Source tab, detailed in the link below.
Pivot Data (from Columns to Rows)
Thanks,
Kent