5 Replies Latest reply on Oct 18, 2013 8:10 AM by Shawn Wallwork

    Adding Filtered Reference Lines

    Kerith Gaines

      Hi Guys!

       

      Having trouble wrapping my brain around a vizualization I want to show on a stacked bar chart. Right now I'm showing Average Hours by Year, and my stacked bars are showing which category the hours are coming from.

       

      What I would like to do is add two reference lines - one showing the overall average hours for the years 08-12, and another reference line showing average hours for just 2013. I just want these to be straight lines for the total population of data. It is ok if the lines move if the data is filtered.

       

      I'm not sure how to tackle this objective, or if it is even possible. Would appreciate any suggestions you might have.

        • 1. Re: Adding Filtered Reference Lines
          Shawn Wallwork

          Kerith, I must admit I just wrote (and deleted) a very snarky reply to your question. It was actually a bit funny, definitely sarcastic, and completely inappropriate. Now that I got that out of my system, let me suggest that you use the Superstore dataset to get as close as you can to an answer for yourself. And then post a packaged workbook showing how close you got.

           

          You'll learn a lot more this way, and your question will ultimately get answered. I know this because what you seem to be trying to do is very straight forward (assuming you have mentioned ALL of the determining factors) and easy to do.

           

          Deal?

           

          --Shawn

           

          HINT: Both reference lines will be calculated fields with your date limitations spelled out.

          • 2. Re: Adding Filtered Reference Lines
            Kerith Gaines

            Hi Shawn,

             

            Shame on me for asking a question when I had a deadline. My boss needed this for a presentation this morning, and I didn't have the luxury of playing with sample datasets all night to get close enough to an answer to receive assistance from you. I ended up just recreating what he needed in Excel. But thanks for your helpful response!

            • 3. Re: Adding Filtered Reference Lines
              Shawn Wallwork

              Kerith, you're welcome! You realize we are NOT paid tech support. We are just fans of Tableau working on our own time answering questions for free, right?

               

              --Shawn

              • 4. Re: Adding Filtered Reference Lines
                Kerith Gaines

                Shawn, I want to be annoyed at your general snarkiness, but I can't because you actually answered my question with the very last line of your first response. I had no idea how to achieve the result I wanted, and was barking up the wrong tree entirely (right clicking on the axis line and adding reference lines). I just needed to be pointed in the right direction - and now I have figured it out for myself, and this knowledge will  help me going forward. So - thank you, Shawn, for helping. I can also promise, after this experience, that I will exercise great reluctance is asking questions on these forums again. My apologies for wasting your unpaid time! 

                • 5. Re: Adding Filtered Reference Lines
                  Shawn Wallwork

                  You didn't waste my time. In fact you taught me an excellent lesson. Thanks for that.

                   

                  --Shawn