3 Replies Latest reply on Jun 25, 2018 6:19 AM by Trent Byberg

    Trends over time for the Top N values using the entire view

    Trent Byberg

      Tableau desktop 2018.1



      I have a common need to select the top N "products" based on the entire view, and showing the trend for each of the top N products over time.


      Using the superstore dataset as an example ... i first am needing the total sales over the entire view, by product name.

      This is the value i would like to rank the products by.


      So i create a calculated field to get me that ... View Total Sales

      Now i would like to show the trend over the selected month range for the Top N products, based on that calculated window_sum



      Below is the sheet showing the View total ---- i.e.   $12,860.56  is the total sales for all months in the view for the first product

      Now i would like to rank the products based on that total, or somehow be able to select the top 10 products based on that calculated field.

      and show the sales trend for the top 10 products over the months filtered to.




      I have tried all sorts of things but nothing seems to jump out at me as a good solution for this one yet.


      Attached is the superstore sample i had started with ...


      And maybe using Window_SUM to get the View total by product over the entire view isn't the correct starting point to solve this.

      I am open to any options/techniques.