Skip to main content

Hi everyone,

I'm currently super early into the learning curve of Tableau (a couple days). I know fairly well how to prep the survey data for Tableau by now (doing it Steve Wexler style) and am now moving into the area of doing actual analysis.

 

What I'm unable to find a tutorial or solution for, is how to create a segment based on multiple answers in the survey. In SPSS I used to create variables for responses that match rules like:

 

Has answered Q_1 with option "2" AND Q_4 with option "3"

 

Then I had a group of respondents that all matched this answer pattern and could use them elsewhere.

 

How can I get to this in Tableau? Do I have to create a calculated field? How would the syntax look for this?

I tried getting there with filters, but it seems not to be the way.

 

Feeling a little frustrated, because I think this is such an obvious thing to do but in no tutorial I watched it was done and I'm also having a hard time googling my way to success with this one.

 

Any help is highly appreciated!

9 answers
  1. Oct 15, 2021, 4:03 PM

    This calculation will return TRUE for a [Response ID] with the listed question values. Since there are only two possible values, use MAX for TRUE and MIN for FALSE

    { FIXED [Response ID]:

    Max([Question ID]='Q2_1' AND [Answer Values]=4)=TRUE

    AND

    MAX([Question ID]='Q4_5' AND [Answer Values]=3)=TRUE

    }

    Here is another example of finding respondents with specific answers. This one is for respondents who have given more than 3 movies the worst rating (technically, leaving [Question Grouping] out of the FIXED statement will return the same users, but with it the TRUE is limited to only the 'Movie' grouping. The other groupings for that user will return FALSE)

    { FIXED [Response ID],[Question Grouping]:

    COUNT(IF [Question Grouping]='Movie' AND [Answer Labels]='Gefällt mir gar nicht'

    THEN [Question ID]

    END)>3

    }

0/9000