3 Replies Latest reply on Jan 19, 2019 3:34 PM by Laura Strudeman

    Lollipop chart and labels above

    Laura Strudeman

      HI;

       

      I am trying to get my labels above my lollipop chart (just specific circles).  I've tried using reference lines as referenced in a former post with no luck.  Basically, I only want to specify a label on some (not all) marks.  Is there any way to do a reference line label on just some of the bars.  See my chart below and my attached tbwx file. Thanks in advance!

       

        • 1. Re: Lollipop chart and labels above
          Ken Flerlage

          It looks like you've manually set some of the marks to always show labels. I'd start out by setting those all back to automatic.

           

          Next, I'd change years - focus to a dimension so it doesn't automatically act like a measure (i.e. it won't try to sum it when you drag it onto the view).

           

          Then drag years - focus to the color card (on the "All" option so it affects both axes). Then assign your colors to the values 0, 1, and 2. This will be cleaner than summing these up and assigning to the sum because it will allow you to filter your data or add more data down the road. It will also simplify the next step.

          Now create the following calculated field:

           

          Highlight Labels

          // Total for only the highlighted years.

          // This will allow us to label those only.

          IF [years - focus]=0 OR [years - focus]=1 THEN

              [Total]

          ELSE

              NULL

          END

           

          Now, on your first axis (the one that uses circle shapes), drag Highlight Labels to the label card. Once there, change it to an average and format it as desired.

           

          Note: If you label the second axis (the bar charts), then the label will hover right above the end of the bar and will likely overlap the circle a bit, so it's best to label the circle so that the label sits above the circle rather than on top of it.

          • 2. Re: Lollipop chart and labels above
            Shinichiro Murakami

            Hi Laura

             

            You don't need reference line.

            Just add conditional label to circle.

             

             

             

            Thanks,

            Shin

            1 of 1 people found this helpful
            • 3. Re: Lollipop chart and labels above
              Laura Strudeman

              both answers were great and worked but Ken taught me a few things on my own  knowledge base; thank you so much!