2 Replies Latest reply on Mar 11, 2016 8:28 AM by Nina Schaub

    Labels on a Bar in Bar Chart

    Nina Schaub

      I have created a bar in bar chart comparing current week sales to same week LY. I would like to show the % difference as a label, however I cannot get any label to appear on the chart. Anyone have insight on how to do this?

      thanks!

        • 1. Re: Labels on a Bar in Bar Chart
          Corey Jones

          Hi Nina,

           

          You should be able to use a calculated field to create a label for the % difference year over year. I created an example using the Superstore data that labels the percentage change at the month level in Q1 (attached). I added the label to the marks of the 2014 sales bar only so that the label only showed up once (at the end of the 2014 bar) rather than on both bars.

           

          Please let me know if you have any questions.

           

          Thanks,

          Corey

           

          Calculation for label:

          (sum([2014 Sales])-sum([2013 Sales]))/sum([2013 Sales])

           

          2013 Sales:

          If DATEPART('year',[Ship Date])=2013 Then [Sales] END

           

          2014 Sales:

          If DATEPART('year',[Ship Date])=2014 Then [Sales] END

          • 2. Re: Labels on a Bar in Bar Chart
            Nina Schaub

            Thanks Corey.

            I have the calculated field created, as I was using this in another crosstab, however it won't let me put any labels on the chart - not even just units. Wondering if I need to create the bar in bar a different way, as I know there are a few different ways you can do it. I will play around with it.

            Thanks!