2 Replies Latest reply on Aug 9, 2017 7:25 AM by Ben Neville

    Creating KPI Symbols using calculated field

    Teresa Wright

      I am trying to find a way to create simple up/down arrow KPI symbols in Tableau.  I found instructions on this site (http://ssssupport.globspot.com/2013/03/tableau-creating-key-progress.html), but I am missing a step.


      Here is the calculation from the website:

      screen shot 1.jpg


      Here is my calculation:


      screen shot 2.jpg


      The instructions then say to change the mark type to "Shape" and drag the KPI calculation to the Shape shelf (which I did).


      However when I went to edit the shape, here's how the instructions looked.


      screen shot 3.jpg



      And here is what was in my Edit Shape box.  Why did my calculation not display both Up and Down?

      screen shot 1.jpg

        • 1. Re: Creating KPI Symbols using calculated field
          Deepak Rai

          This is because your calculation might be returning only one value. Pl check output from your calculation.



          • 2. Re: Creating KPI Symbols using calculated field
            Ben Neville

            Deepak is correct. This is very common with what I'll call "lopsided data". "Lopsided calculation" is probably more appropriate, but you get the idea. The easiest way to handle this is to assign the correct shape for Down, then select OK. Then edit the calculation and reverse the > to a <= to ensure the calculation now returns Up. Go back and assign a shape for Up and select OK again. Now go return the comparison to its original greater than, and you will notice it remembers whichever shape was assigned to this originally. This is because Tableau keeps these assignments in the XML so that it can use them next time the calculation meets this condition.


            If you were expecting at least some values to be greater than 1, maybe the underlying calculation you're referring to is a percentage and you really need to use a decimal? Just a thought in case you're concerned about the actual calculation result.