Skip to Content
Author's profile photo Sateesh Kumar Bukkisham

Stacked chart with totals

Hi Team ,

It’s simple trick to display totals of stacked column like below

On top

at bottom (along with category axis)

How to do !

On Top

I have Business area and fiscal period wise Revenue stocked column chart.

1.Create a stacked column chart with Business Area in category axis ,Revenue in Values axis  and Region Type : Fiscal Period

2.Now we need totals to display on top .Create a detail variable to get Business are wise totals .

Total =FormatNumber([Capital  Cost FC] In ([Business area]);”#”)

Note : If you have big numbers ,then it is better to show them in Millions (if Value)/MT (if Quantity) .So that we can adjust totals to look like for each column.

3.Create a variable with dummy measure .This is to have measure against Detail total variable

Dummy =100

4.Create a column chart (any chart ) with Total variable in X- axis , Dummy measure variable in Y-axis.Fiscal period in region type to have context (if any to measure)

5.Show only category axis only .Unchecked value axis, title,legend ,..

6.select palette for chart : create a custom palette with all white colors

This is to don’t show columns in chart.Format column chart category axis to show numbers in bold color .Decrease height of column chart to get the category axis and some space for columns .By doing this we should get values like below.

7.This is important part .Align this column chart on top of stacked chart so that it will appear as total of the column.

Cons :

* we need to have another chart , it will heavy our report .

* we should be very concise on formatting and aligning.

* It is not possible to show very outside of each column .All totals are at same height.

at bottom

Assign Total -detailed variable in category axis .Insert a blank cell , name it Totals and align it as to represent category axis total .

Cons:

Totals are shown at category axis itself .We should inform to user .

Hope somebody will find it helpful. 🙂

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Nice trick

      Author's profile photo Former Member
      Former Member

       

      Hi Satish. I am trying to use the logic for displaying totals on top and I am not successful on my requirement. Could you advise on it.

      I have a "total" & "year" fields. And Totals should be displayed on top based on the year. sample below: Quick help on this will be highly appreciated. Thanks

      ----

      100       200          300

      15/16    16/17       17/18

       

       

      Author's profile photo Sateesh Kumar Bukkisham
      Sateesh Kumar Bukkisham
      Blog Post Author

      Hi VIjaya ,

      I afraid we can't properly align on top portion , that is the reason I've considered below portion of chart .

      which version you are in ,I'll see if we can get something for top section in latest releases !

       

      Regards

      Sateesh