8 Replies Latest reply on Nov 23, 2016 11:15 AM by Cliff Shaw

    Bar Chart Help

    Cliff Shaw

      I have pre and post assets exposure evaluation questions that I want to graph together. They would both be Dimensions (Pre-Q1 & Post-Q1). The row axis will run from (1) Strongly Disagree to (5) Strongly Agree.


      There are two questions here...


      (1) I've been digging through the threads and can't find any solution to showing two dimensions side by side so I can see in a bar graph count of Agree / Pre and count of Agree / Post.


      (2) Some data isn't collected for all responses so if no one selects "Neutral" then data is empty and Tableau can't include it in the viz. I'd like to be able to add a dummy column with the value of 0 so that this is still represented in my dashboard.


      Are either of the above options possible in Tableau or are there alternatives that could accomplish the same?


      Thank you!


        • 1. Re: Bar Chart Help

          Hey Cliff,


          I would take a look at our great whitepaper on survey data:


          Visualizing Survey Data | Tableau Software


          Otherwise, we're going to need a packaged workbook to give you a more in-depth answer.





          • 2. Re: Bar Chart Help
            Matt Hong

            Hi Cliff,


            Yes, these are all easily accomplished.


            (1) Assuming that your Pre-Q1 and Post-Q1 are separate dimensions, you first pivot the data so that they are as follows:


            Respondent     |     Pivot Names       |     Pivot Values

            R1                    |     Pre-Q1                |     2

            R1                    |     Post-Q1              |     3

            R2                    |     Pre-Q1                |     3

            R2                    |     Post-Q1              |     1




            You can then see the Pre-Q1 and Post-Q1 side-by-side after creating a group out of the Pivot Names column.



            (2) Yes, this is accomplished by a single formula, zn([Response]), which turns any null values into 0.


            I work in market research and would gladly help regarding survey data if you have any more questions.

            • 3. Re: Bar Chart Help
              Cliff Shaw

              Thanks Matt!


              I'll give this a try and reach out if I have any other questions. Thanks!!

              • 4. Re: Bar Chart Help
                Matt Hong

                Of course!


                BTW, please accept my answer as correct if it's worked out for you. I think there's a button for it somewhere?

                • 5. Re: Bar Chart Help
                  Cliff Shaw

                  Hey Matt,


                  So I have a situation where respondents aren't forced to answer a question therefore I have blanks that are skips however I still want to create a 0 bar for options that weren't selected. Do you have any input on this?


                  If you could provide an example workbook that'd be great.



                  • 6. Re: Bar Chart Help
                    Matt Hong

                    Go to Analysis -> Table Layout -> Show Empty Columns (if bars are vertical) or Show Empty Rows (if bars are horizontal)


                    Not sure if you need a workbook for this but let me know if you do.

                    • 7. Re: Bar Chart Help
                      Cliff Shaw

                      Hey Matt,


                      I already tried that. Didn't do anything for my viz. Since no one selected option D I assume that Tableau doesn't know it exists so has nothing to show.



                      • 8. Re: Bar Chart Help
                        Cliff Shaw

                        I am working in another thread and looking at scaffolding to fix my option D issue.


                        For your help on pivoting the data. Does the same work for unpaired data? Say they took the Pre but not the Post or vice versa. Do I have to create two rows per respondent and just leave the second blank or just pivot the data and include what I have?