4 Replies Latest reply on Dec 3, 2018 8:08 PM by Coco Lee

    How to create 100% stacked bar chart with calculated measures

    Coco Lee

      I am new to Tableau. I tried to search on forum, but I still haven't found a solution for my problem, could anyone can help please?


      How can I turn the below chart into 100% stacked bar chart?


      Source data    >> in respondent level, each record contains survey date and servicing score given by customer


      Columns         >> Year(Date) Quarter(Date) Month(Date), where "date" is the survey date


      Row                >> WINDOW_SUM(COUNT([Score]), -2, 0), where "score" is the value of servicing score.

                               I want to show the count of servicing score of rolling 3 months. i.e for Feb, it show the count of score from Jan-Feb, for Mar, it show the count of score from Jan-Mar, for Apr, it show the count of score from Feb-Apr                          and so on...


      Grouped score >> IF [Score]<=6 then '0-6' ELSEIF [Score]=7 or [Score]=8 then '7-8' ELSEIF [Score]=9 or [Score]=10 then '9-10' END


      As the number of sample in each month is different, so I want to show them in percentage, what should I do?


      Here is my desired outcome made by Excel.