3 Replies Latest reply on Oct 25, 2013 10:28 AM by Jre Sarenac

    Linear interpolation in Tableau

    Jre Sarenac

      I have two data sets, both of which are displayed over time.  For one of the data sets I have every single point in time and for the other, I only have 20 points total. 

       

      Tableau will automatically draw lines connecting all the points which is perfect, but the problem comes when I drill down between points on a dashboard, then it doesn't display anything.  One way to solve this problem would be to linearly interpolate and store all the points in the database.  However, this does not seem very efficient.

       

      Is there a way to handle this in Tableau?

       

      Capture.PNG.png

        • 1. Re: Linear interpolation in Tableau
          Alex Blakemore

          Tableau doesn't currently let you turn-off linear interpolation when displaying line and area charts. As you've found out, that can lead to misleading visualizations if there are gaps in time between data values (assuming time is the x-axis). If you'd like to be able to choose between step plots and linear interpolation, upvote the following idea http://community.tableau.com/ideas/1067

           

          The best workaround I've found is to fill in the data between measurements in effect repeating each measurement at later times until just before the next change in value. You can do that by a little custom sql or pre-processing the data automatically or in the worst case by hand.

           

          I gave an example of how to do this by custom (Oracle) sql in the tips in the wild session at the 2012 Tableau customer conference. If you can find the video and workbook online, that might help if your example was similar. The basic idea was to write SQL to generate a table of zeros for each date/time in range, then union those values with the original data, and finally plot a running sum. ( I can't post it at the moment, but will look for it later on)

          • 2. Re: Linear interpolation in Tableau
            Jre Sarenac

            Thanks for your response Alex.

             

            I actually want the linear interpolation to occur.  The problem is that when I filter on one sheet and it affects another (in a dashboard), and the drill down occurs between points (or there is only one point), the linear interpolation doesn't occur.

             

            This example is what happens when I filter and there is only one point.  I want the light blue line to be continuous, like the dark blue line.

             

            Let me know if I can clarify further.  Thanks!

            Capture.PNG.png

            • 3. Re: Linear interpolation in Tableau
              Jre Sarenac

              This is an example of what I'd like to happen when I drill down down (i.e filter from one viz to another).

              Capture2.PNG.png

               

              This is what happens currently:

              Capture2.PNG.png

               

              So, because I only technically have one point on the drill down, it is not drawing a line between the points outside of the second viz, which I would like it to do.

               

              Any suggestions?