3 Replies Latest reply on Dec 3, 2018 4:11 PM by swaroop.gantela

    Dual axis isn't stable

    Debora Barnes-Josiah

      Hi, I am a 7-month Tableau user, and have learned just enough from these forums to be dangerous. I’ve attached (a simplified version of) my workbook that *almost* works but am getting hung up on a dual axis issue.  I use Tableau desktop 2018.1.6.

       

      The object of the workbook is to display progress on a series of Metrics; each one has a specific Target and Outcome (“score”).  The absolute value of the difference between the target and the score is called “Improvement Needed” (“IN” for short).  There are 3 different ways to assess IN: 1) whether “additional” or “fewer” units are needed to meet the target, 2) whether the target was met (“Target met”) or data are missing (“No data”), and 3) what the units are, e.g., “visits, children”.  Finally, there is a geography parameter which selects between “Region” and one “County.”

       

      I couldn’t figure out how to make a single field with conditional labels, e.g., “382 additional children” when IN=382 and Direction=additional, vs. simply “No data” if the data were missing, so I ended up creating new fields for each of those 3 assessments (“direction”, “Met or Missing”, “units”).  “Met or Missing” is a calculated field with a value of 0.0 when the target was met or the data are missing, and null otherwise.  Then I plotted “Met or Missing” and IN on synchronized dual axes, with a fixed axis value of 0 at the low end and automatic for the high end, and then IN, direction and units in the labels.

       

      This whole thing actually works when Region is selected as there are data for each metric (1st image).  The problem stumping me is that the axis shifts to the right (by adding hidden negative numbers) when all the data for a set of metrics are “met or missing” (2nd image).  Any suggestions?

      Dashboard working.png

      Dashboard not working.png