The Data School Gym - Sort and Filter by % of Total

by Andy Kriebel

A new week means another challenge in the Data School Gym. This challenge came about because Nai Louza had a tough calculation she needed help figuring out. Here’s the final result you should produce:

Sort by % of Total

  1. Build a stacked bar chart that shows % of total sales for the East and West within each Product Sub-Category
  2. Sort the bars by the % of total sales in the East
  3. If you reorder the Regions, the sort should switch to the % of total sales in the West
  4. Provide a method for the users to pick how many product sub-categories they want to include


  1. You can do this with table calculations. You do not need to use LOD calcs.
  2. For the sorting, you have to figure out how to sort by only the value of the East (or West if you change the order on the color shelf).
  3. The Top N filter you see above is NOT a parameter.

You can find the final solution that I created here. Don’t cheat. Try to figure it out before looking at the solution. Reverse engineering is such a great way to learn.


Andy Kriebel

Dashboard Week Day 5 - Eastern Bering Sea Crab Distribution

1 mins read

Fri 27 Nov 2020

Dashboard Week Day 4 - California Fire Incidents

1 mins read

Wed 25 Nov 2020

Dashboard Week Day 3 - Historical Tornado Tracks

1 mins read

Wed 25 Nov 2020

Dashboard Week Day 2 - The Change in Forest Cover

1 mins read

Tue 24 Nov 2020