5 Replies Latest reply on Mar 11, 2016 1:51 PM by Jeffrey Gwin

    how to add target line in tableau?

    Mitomo Somehara

      Hi, I am wondering how I can insert a target line in Tableau?

      or how to insert different constant values, in different panes when adding reference line.


      I want to make it look like the screen shot, however, the value is in average now. I want to create a target value so each month, I know I'm hitting the target, and when I hit my target, I want to increase the target line.


      Sorry for the poor wording.

        • 1. Re: how to add target line in tableau?
          Wesley Magee

          I think you're on the right track with a reference line. My suggestion to get what you want would be to create a parameter to allow you to set the value.  Your given the option in the "value" dropdown box.


          Reference Line Options.PNG

          From there you can set the parameter range to be whatever you think is appropriate (100 to 300 looks right for this data). I've set my range from 1 to 5,000 in the example below. Then all you have to do is show the parameter control and use it to set the exact value you want.

          Parameter Setting.PNG

          Hope this helps.  Let me know if I missed anything.


          2 of 2 people found this helpful
          • 2. Re: how to add target line in tableau?
            Mitomo Somehara

            Thanks Wesley!


            Is it possible to delete the old parameter when you add another one ?


            Like, In May,parameter 1 was my target, then in June I've set another target (parameter 2) at a different value. In this situation, I want the Parameter 1 in June to disappear and Parameter 2 in May section disappear?


            Does that make sense?

            • 3. Re: how to add target line in tableau?
              Wesley Magee

              Yes, that makes sense. The intention is have the parameter work on a month by month basis, instead of using a single parameter across all months, correct?


              You can't have a reference line use different parameters for different months as far as I know, so we'll have to use a different solution.


              My recommendation would be to add it to your database, since that target value becomes static at month end. This will allow you to keep a record of your historical targets, while allowing you to set new and adjustable targets for the current month.


              If you don't have access to or can't add information to your data set, then you could create a history of your target values via a calculation.  Something like this:


              If MONTH([Order Date]) = 6 and YEAR([Order Date]) = 2011 Then 1,000

              Elseif MONTH([Order Date]) = 7 and YEAR([Order Date]) = 2011 Then 3,000

              Else 5,000



              This calculation would add a target value of 1,000 for June 2011, 3,000 for July 2011, and 5,000 for all other time periods. Place it on the rows shelf as an Avg() and use a dual axis chart. Then all you have to do is format these values as a light gray in order to have your actual values standout.


              I don't recommend this approach as it will be much more difficult to maintain, but it could be a short term solution.

              • 4. Re: how to add target line in tableau?
                Mitomo Somehara

                Thanks for your help!!
                I'll try it and see how I go =]

                • 5. Re: how to add target line in tableau?
                  Jeffrey Gwin

                  A bullet graph works great for evaluating moving targets. This graph is comparing actual supply costs to date against target supply costs to date.

                  By default, adding the two measures to the Rows displays like this.

                  bullet graph 1.JPG

                  Then change the graph to bullet and move your reference value to the Marks tray:

                  bullet graph 2.JPG

                  You can remove the distribution shading by removing the reference line.

                  bullet graph 3.JPG

                  And then change the orientation if you want.  The reference line constantly adjusts with the data.  No parameters required.

                  bullet graph 4.JPG

                  1 of 1 people found this helpful