Data Viz Done Right

March 16, 2016

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

1 comment

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:

Click on the image for a larger version


  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.

1 comment :

  1. Can you please tweet when ever you post a new one

    Thanks / @patternproject