3 Replies Latest reply on Sep 1, 2016 9:03 AM by chris.moore.11

    Limit graphs to show only top models based on aggregated attribute across time

    Yuk Leng Loh

      Hello everyone,


      In this chart that I'm making, I'm trying to limit the graphs to show only top models. However I'm having difficulty understanding why Tableau behaves the way it does.

      I've attached a sample workbook.


      The viz shows by car models the history as well as forecasts from sales team and the system generated. The difference between the sales and systems forecast is called the gap.


      I need to limit the viz to show only 4 car models with the largest gap (defined as the absolute value of difference across 18 months between total sales forecast vs total system forecast)


      I made a calculated field called "Abs Gap - by Region by Model by Division" using LOD expression, which produces the gap by each model. This is shown in Sheet1


      The thing I cannot figure out is this:

      - When I bring "Abs Gap - by Region by Model by Division" to filter, and do a RANK table calculation, and then filter to <= 3, it seems to work - the graph is now limited to just showing the top 3 models. This is shown in Sheet 2

      - But (in Sheet3) if I filter to <= 4, the charts shown are incomplete. Eg: for model 3308i and 2262i, only the first part of the history is shown, and none of the forecast portions are shown.

      What is causing Tableau to show only a portion of these charts?

      And how can I get Tableau to just show the top 4 charts based on largest gaps?


      Thanks for reading and helping!