You need to adjust the scope of your percentage of total calculation from Table (Down).
I think the problem is with the data provided ... otherwise that should work fine.
and you're right Jagjit... I tried it and getting 7.x % for the month of July 2012
This does work, as this is related to the Tableau training, I was deliberately coy in my answer insofar as to provide you with guidance without providing the full answer.
The calc is the percentage of total scoped to Customer Segment so either:
Convert the Sum(Sales) to a percentage of total table calc and then scope to Customer Segment or create the full calc: Sum(Sales) / Total(Sum(Sales))
and then scope to Customer Segment
% Calc.png 148.1 KB
1 of 1 people found this helpful
You can get to the result you desire if you get the addressing and partitioning for your quick table calc right. Bear in mind that for table calcs their orientation is separate from the underlying formula itself. In the attached workbook I am getting to the desired result, when I take the month of July 2012 as my total, and calculate the percentage of each customer segment out of that. Have a look, and revert with comments if any further help is needed!
BTW some of the best starter learning resources regarding table calcs are:
1) This whitepaper from Tableau and
2) This exercise workbook from Tom Brown
Great responses. I have a huge issue in that my Superstore doesn't dhow any sales for for Home Office in July 2012.
This is weird.
I redownloaded another from Tableau Community and get 4.65%
Is there some "Official" Download location for the Superstore?
From a Global Superstore DL, in the raw excel, I got 5.65%
What are these sample questions based on? Or has the sample test become obsolete with wrong answers?
OK I get it. I see what Vladislav did and my mistake.
Pull in just the Orders table and go with it. I was pulling in all the tables and inner joining them which was throwing everything off.
Thanks V, It was a good thinking exercise overall.
The answer is 23.97
Here is the solution -
Let me share how I solved it.
Bring Customer Segment to Columns and Sales to Rows. Compute Sales using Table (across).
Put Filters for Order Date - 2012 and July.
You should get the result as expected.
The dataset that I used is from http://mkt.tableau.com/files/DesktopQA_ExamGuide.pdf - just before Question 4, there is a link to the Sample Superstore File.
Hope that helped.
Please let me know if you still face any difficulty.