1 of 1 people found this helpful
Simplest solution is to (1) Pivot your years in your data (2) use Tableau's built-in Top N feature.
Select 2017 & 2018 columns and then right-click and select Pivot from sub-menu:
Thereafter, rename Pivot Field Names to Year and Pivot Field Values to Amount and your data will now look like below (breaks your % Chg calc & Rank calc, but will be easier to do after):
Then drag and drop as shown:
Drag Brand to Filters Card and select Top 10 by Amount SUM:
Now you'll have your Top 10 for both years and then turn on Grand Totals:
% Difference is just another instance of SUM([Amount]) and uses a Quick Table Calc to perform the difference.
If this answers your question please mark it as correct so that others may find it in their search for a solution in the future. Best, Don How to Mark an answer as Correct
We would love to hear your feedback on your Tableau Community Forums experience.
Please take this 5 minute survey.
Don, Thank you very much for your help. Really appreciate it!
I duplicated the steps you indicated in the write-up. I got the same results as you, but I noticed that the Top 10 are not being filtered correctly. When I removed the Top 10 filter there are 4 brands that have higher volume: Seagram's Gin, Pinnacle Vodka, Paul Masson, and Jim Beam - that are not included in your Top 10 chart. The true Top 10 total should be 1,068,254 (2018). If you have a few minutes to take a look I'd appreciate it.