4 Replies Latest reply on Jul 9, 2018 12:40 PM by Nikhil Tawakley

    Top N- Filter & Plot

    Nikhil Tawakley

      Suppose one has the following table that tracks the size of a software project over time. Now lets say we want to plot the end-of-day size vs date. How does one get Tableau to pick the max(Version) each day on the plot? (A simple plot between Business Date vs Size would add up the sizes of each version.)

       

      VERSION_SIZE_TABLE:

      DateVersionSize (MB)
      09-Jul-18088
      09-Jul-18154
      10-Jul-18215
      11-Jul-18361
      11-Jul-1846
      11-Jul-18550
      12-Jul-18614
      13-Jul-18733
      13-Jul-18813
      13-Jul-18964
      13-Jul-181050
      13-Jul-181138
      14-Jul-181286
      15-Jul-181360
      16-Jul-181428
      17-Jul-181533
      18-Jul-181694
      19-Jul-181776
      20-Jul-181815

       

      One way to approach this would be to write SQL query to create an intermediate table that only holds the latest version per day (using an outer join). However, my data set is huge and while the following query works, it's painfully slow.

       

      select *

      from {oj VERSION_SIZE_TABLE s1 right outer join

                   (select max (Version) AS Version, Date from VERSION_SIZE_TABLE group by Date) s2

               ON s1.Version=s2.Version and s1.Date=s2.Date}

       

       

      Tableau Version: 10.0.0

       

      Thanks,

      NT