1 2 Previous Next 19 Replies Latest reply on Oct 6, 2015 7:44 AM by Dylan Kiernan

    Tableau 9.0 and Survey Data!

    Susan Baier

      Hi gang,

       

      I hope you're all excited to check out the new stuff in Tableau 9.0! It's got a lot of wonderful features that make it even better for visualizing survey data (I personally love the customizable Story Points functionality).

       

      As you work with the new version once it's released in the next couple of weeks, please share your experience and any tips/tricks you discover for working with survey data. I know everyone in this forum will appreciate hearing what you're doing in Tableau 9.0.

       

      One thing to note about the new data prep capabilities within Tableau 9.0 -- if you're used to reshaping your survey data and then mass aliasing your field names to something that human beings can understand (For example, if you have a bunch of ratings on questions with field headers like "DESC01, DESC02, etc." but want them to appear on your charts with names like "How do you feel about ice cream?") then READ ON -- our resident Tableau experts have some great advice in this thread about how to pull that off with data that's been reshaped within Tableau. (Thanks Jonathan Drummey and Steve Wexler!)

       

      There are lots of wonderful features in Tableau 9.0 for working with and presenting survey data, and I'm excited to see what all you smart folks are doing with it! So please share!

       

      Thanks,

       

      Susan

        • 1. Re: Tableau 9.0 and Survey Data!
          Steve Wexler

          Susan et al,

           

          Some folks at Tableau prompted me to see if a blend would solve the problem.  I had in fact tried this before and ran into problems but the problems where unexpected results from the Tableau data interpreter and not accounting for how the pivot feature handles nulls.

           

          In any case, it appears that for many things you can get the grouping and aliasing you need with a blend.  I still very much want to do a join so I can combine text responses with numeric responses, but for the aliasing it appears that a blend will do the trick.


          I'm happy to walk you through the process.


          Steve

          • 2. Re: Tableau 9.0 and Survey Data!
            Jonathan Drummey

            Hi Susan,

             

            I'm going to go through some points of clarification re: terminology & functionality here, because your statements mix up the common terminology used for joins and blends and give an unclear picture of what is available in Tableau v9.

             

            join = what happens when we connect tables (or database views, etc.) in the data source window:

             

            Screen Shot 2015-03-12 at 5.46.03 AM.PNG

             

            The result of a join is a data source in Tableau.

             

            blend = what happens when we connect different data sources:

             

            Screen Shot 2015-03-12 at 5.50.24 AM.PNG

             

            The primary data source is the first data source used to build the worksheet and gets the blue background check mark. The secondary data source(s) are ones blended to the primary and get the orange check marks.

             

            This is all true for Tableau since data blending was introduced.

             

            The new pivot feature in version 9 lets us pivot a set of columns to be more rows in the data. The pivot occurs *after* the join, not before. Here's an example where I've got one table with columns for 2001-2003 and a second table with columns for 2004-5, after the tables are joined on the common key (Row ID in this case) I can do a pivot across the fields from the two tables:

             

            Screen Shot 2015-03-12 at 6.00.16 AM.PNG

             

            And the result of the pivot:

            Screen Shot 2015-03-12 at 6.02.04 AM.PNG

             

            Ok, so in v9 the pivot happens *after* the join. That means that we can't do things like pivot a set of survey questions that have things like Q0183731 for column headings and immediately join in human-readable question names. For short, I call this "pivot and join", where we want to pivot one set of data and then join the pivoted data to another set of data.

             

            However, data blending happens *after* the pivot (and some other things like aggregation, alias assignment and densification, I'll be doing a Think Data Thursday on this in a couple of weeks, see http://community.tableau.com/thread/157773 for details). So we *can* use a pivot to build a data source and then do a data blend to a secondary source to get the effect of a pivot and join. Here's a case where I did just that -- the QUESTION dimension is a set of pivoted columns that are blending to the secondary data source that has the Description:

             

            Screen Shot 2015-03-12 at 5.49.06 AM.PNG

             

            And from there, we can then use the Primary Groups feature to "push" the Descriptions to create a group in the Primary source and therefore no longer require the secondary source:

             

            Screen Shot 2015-03-12 at 6.10.28 AM.PNG

             

            Screen Shot 2015-03-12 at 6.10.45 AM.PNG\

             

            So in Tableau v9 there are three different solutions for this situation of wanting to pivot and join:

             

            1) Do all the work in the original data source to do the pivot & join and have a single Tableau data source.

            2) Do the pivot in the original data source, make that available as a table/view/Custom SQL query in Tableau, then join the additional data in Tableau to have a single Tableau data source.

            3) Do the pivot in Tableau, then connect to the additional data as a second data source and use a Tableau data blend to connect the two sources (and potentially use Tableau's Primary Groups to end up with only a single data source with all necessary information to build the view).

             

            Does that make sense?

             

            Jonathan

            1 of 1 people found this helpful
            • 3. Re: Tableau 9.0 and Survey Data!
              Susan Baier

              Thank you Jonathan for your wonderful post! I have updated the original to make sure folks (like me!) looking for help on this topic find your information. I'm sure there are many others who will struggle with this based on how we were doing mass aliasing prior to 9.0.

               

              Your engagement here is very much appreciated!

               

              Susan

              • 4. Re: Tableau 9.0 and Survey Data!
                Jim Wahl

                The primary group approach is a nice workaround.

                 

                You just have to remember to update the primary groups after any change to the question descriptions. And hope that anyone editing the workbook also remembers.

                • 5. Re: Tableau 9.0 and Survey Data!
                  Susan Baier

                  OK Jim, that's something that I definitely would have failed to recognize (and, therefore, would have screwed up). Thank you.

                  • 6. Re: Tableau 9.0 and Survey Data!
                    Steve Wexler

                    Jonathan, 

                     

                    I responded to the other thread already but wanted to chime in about the Create Primary Group feature.

                     

                    I did not know this even existed.  Great stuff.

                     

                    I still want / need a join so I can have both text and numeric survey responses available to me, but there are ways to work around that (albeit somewhat cumbersome).

                     

                    Steve

                    • 7. Re: Tableau 9.0 and Survey Data!
                      Jonathan Drummey

                      Thanks for pointing this out, Jim! Requiring manual intervention for

                      updates is the biggest reason why I rarely use primary groups.

                       

                      Jonathan

                       

                       

                      On Thu, Mar 12, 2015 at 7:08 AM, Jim Wahl <

                      • 8. Re: Tableau 9.0 and Survey Data!
                        Jonathan Drummey

                        Hi Steve,

                         

                        I'm wondering what you mean by "...both text and numeric survey

                        responses..."? Are you referring to the Pivot Field Values stuffing all

                        responses into a single column?

                         

                        On Thu, Mar 12, 2015 at 10:30 AM, Steve Wexler <

                        • 9. Re: Tableau 9.0 and Survey Data!
                          Steve Wexler

                          Jonathan,

                           

                          When one downloads survey data using a tool such as Qulatrics, the tool give you the option to download the responses as text (e.g., "strongly disagree", "disagree", "neutral", etc.) or as numbers (e.g., 0, 1, 2, etc.).

                           

                          I find that life is much easier with both options.  So there will be three columns

                           

                          Question ID          Value          Text

                           

                          I'll reshape twice and then join.  Works great.

                           

                          Steve

                          • 10. Re: Tableau 9.0 and Survey Data!
                            Susan Baier

                            Steve I'd love to understand how you're doing this Value/Text thing.

                             

                            Susan

                            • 11. Re: Tableau 9.0 and Survey Data!
                              Steve Wexler

                              Susan,

                               

                              What I want to do is take this piece...

                              Numbers.png

                              ... and this piece...

                              Labels.png

                              and make something that looks like this:

                              Both.png

                              By having both label and numeric responses I avoid having to deal with creating many CASE statements in Tableau.

                               

                              Things like

                               

                                CASE [Value] WHEN0 then "Not at all"

                                WHEN 1 then "Small degree"

                                WHEN 2 then...

                               

                              You'll have to do this over and over again as sometimes a 0 will mean "Not at all" and at other times it will be "strongly disagree".

                               

                              The same problem occurs if you attempt to alias values.  If you turn the values unto strings you can only alias each string 1 time, so you end up having to create duplicate fields.

                               

                              If you start with text values, then you have to create lots of versions of this:

                               

                                If [Response] = "Not at all" then 0

                                ELSEIF [Response] = "Rarely" then 1

                                ...

                               

                              I'm posting a video of my session from the 2014 Tableau Conference (you can find it at Visualizing Survey Data using Tableau - YouTube).  The applicable part may be found at around 14:00 into the presentation.

                               

                              Steve

                              • 12. Re: Tableau 9.0 and Survey Data!
                                Susan Baier

                                Interesting. I think I'm doing what you're trying to avoid, but more manually in my data source (Excel) before I reshape and connect in Tableau. I'll check out the YouTube.

                                 

                                Thanks again for your generosity in helping me out!

                                 

                                Susan

                                • 13. Re: Tableau 9.0 and Survey Data!
                                  Mohamed Yahia

                                  Hi Jonathan,

                                   

                                  I have binary columns from a survey. The values in each column are either 1 (representing Yes) or -1 (representing No). The columns belong to two categories: Applications and Hardware. How do I do the join/blending in a way that gets me two quick filters (Applications, Hardware) without nulls?

                                  • 14. Re: Tableau 9.0 and Survey Data!
                                    Elliot DeRemer

                                    Hi -

                                     

                                    I'm trying to do Pivot survey data that is stored in an Access db.  However, the Pivot option in the drop down is not available when connected to Access.

                                     

                                    Is it possible, or only with flat files?

                                     

                                    Thanks!

                                    1 2 Previous Next