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
Requirements

  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

Hints

  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.

Avatar

Andy Kriebel

Wed 23 Jun 2021

Mon 26 Apr 2021

Fri 26 Mar 2021

Thu 25 Mar 2021