5 Replies Latest reply on Aug 21, 2017 9:04 PM by Dora Zhong

    Shade portions between two lines (including negative values)

    Dora Zhong

      My data includes highest temperature, lowest temp., region, date and sales. Two temperature lines need to be on the same axis so I can add the sales on the second axis.

      I tried to shade the portion between the temperature lines by adding a reference area, but it didn't work well (see the steps below).



      I knew there are some similar questions like Re: Shade between lines where sales fall below budget , but the situation here is different because the lowest temperature might fall below 0. So if I shaded the portion, I need to divide the lowest into two parts: 1) if lowest temp. < 0, shaded; 2) if lowest temp. >0, white. And I don't know if I can achieve this by sql.



      Another approach is to reset the original point of y axis, e.g. to -30. So I can simply shade the lowest temperature line. But I am not sure if Tableau supports this.


      Any ideas would be appreciated! Thank you.