4 Replies Latest reply on Sep 28, 2018 1:19 AM by Chandana Kollu

    Percentage on Stacked bars with Department sales on the Y-Axis and Tiers on the X-Axis.

    Gitesh Goyal

      Hi Guys,


      I need some help in Tableau visualizations.


      We need to make a visualization in Tableau with the scenario explained below:


      Scenario: We have 4 metrics: Sales Department A, Sales Department B, Sales Department C and Sales Department D (These are all independent metrics used to fetch data from a large database).


      We need to present sales data Tier-wise in the form of a stacked chart as per the attached image (Tableau Query Pic.png)


      Now the problem is to have the percentages as Labels on the bars as per the below calculation:

      Eg: Percentage sales of Department A in Tier 1 = (Sales of Department A in Tier 1/ Total sales in Tier 1)*100.


      We need to have Sales on the Y-axis and Tiers on the X-axis.


      Please find enclosed the sample data for this chart. (Tableau Query.xlsx). I am using Tableau Desktop 10.3


      In addition, i have tried the annotate feature but it doesnt work as expected as the position of labels is static.


      Looking forward to your reply.


      Best regards,

      Gitesh Goyal.