5 Replies Latest reply on Dec 7, 2016 11:06 AM by Angela Schrader

    How to show totals for marks in bar chart

    Angela Schrader

      I'm struggling with table calcs and totals!

      In this bar chart I have total billings for 4 different categories (Biz Category) split out into Fiscal Years by color.

      I would like to show the total for all 4 categories for each Fiscal Year (i.e. a 5th column called Total with a total for the blue bars and a total for the green bars).

      I can only seem to find a way to show a Grand Total for everything - which is not at all useful.

       

        • 1. Re: How to show totals for marks in bar chart
          Joe Oppelt

          You can do that with a separate sheet and position them side-by-side on a dashboard to look like one viz.

          • 2. Re: How to show totals for marks in bar chart
            Angela Schrader

            Yeah - that was the only option I was finding through my searches but this is not favorable.  When I have done this before, that "side-by-side" approach looks messy as I choose different filter options on the dashboard and I end up having to resize both views.  = Painful.

            I'm hoping to find a non-kludged solution so that I don't have to keep manually maintaining / aligning two separate sheets. This is one of those cases where I'm trying to move to Tableau, but Excel was easier.

            Thanks though.

            • 3. Re: How to show totals for marks in bar chart
              Joe Oppelt

              Can you upload a workbook that demonstrates what you have and maybe we can come up with something you can live with.  Let me know the version of Tableau you are on when you upload.

               

              It looks like you have partitioned the chart by [Biz Category].  Obviously you have no biz category for "total 2016".  Nobody usually does.  If you did, we could shove 2016 totals into there.  Ditto 2017.  The way the sheet is laid out, Tableau wants to partition this by biz category.

               

              But if you were to create separate measures (via calcs -- you don't have to do it in your data) we could partition the same sort of chart by measure name.  Separate measures for the separate categories, plus another measure for total, and you could achieve what you are looking for.

              1 of 1 people found this helpful
              • 4. Re: How to show totals for marks in bar chart
                D Barnetson

                Hi Angela,

                 

                There is a way to achieve what you are trying to do.

                 

                To start, you will have to create 4 separate calculations (one for each Category within 'Biz Category'). Each one will use the following formula:

                 

                i.e.; IF [Biz Category] = 'Maint Subs Renewal' then [Number of Records] END

                 

                Now, place 'Measure Names' & Year(Date) on the Columns Shelf, and 'Measure Values' on the Rows Shelf.

                 

                Place Year(Date) on Color of the Marks Shelf.

                 

                Finally, place 'Number of Records' on the Measure Values Shelf, then right click on the 'Number of Records' header to change the  'Alias'  to 'Total Sales'

                 

                See picture attached:

                 

                 

                I have included a packaged workbook for you to review.

                 

                Hope this helps.

                3 of 3 people found this helpful
                • 5. Re: How to show totals for marks in bar chart
                  Angela Schrader

                  Thank you  D Barnetson   and Joe Oppelt . Both answers were very helpful and not only gave me the result I was needing but also taught me a lot about charting with Measure Names/Values. This will help even more in the future.

                   

                  Many thanks to you both for your time and expertise!!