3 Replies Latest reply on Dec 27, 2018 3:17 PM by Jim Dehner

    Create a filter from the answers to a question

    Kevin Jessop

      Hi everyone,


      This seems like a very silly question, but I've been having trouble with this all day.


      I have survey data in Tableau - it's basically in the format Steve Wexler recommends where I have one dimension which contains all my questions (Questions), one that contains all the responses (Answers), and several other demographic dimensions.


      So, to see data from a question, I drag the Questions dimension into my filter, select the question or questions I want to see, and then drag my Answers dimension onto rows/columns to show the responses. I can then add the data using various calculated fields.


      The trouble is this. I want to create a sub-filter - so I'm only looking at my data by people who had responded "worse" or "somewhat worse" to a previous question. This would be very easy If I was using my demographic dimensions as I would just drag them on. But, alas, I am not. I need to create something that basically says, only show the answers to people who have given "worse" or "somewhat worse" in Answers to Question 2 in Questions.


      It's worth noting that I have my data as labels (strings) and values. Either way, I'm still totally stuck.


      Oh, this is kinda what I want to do with the calculated field but I know it's totally wrong:


      IF [Question]="Q3" AND [DATA VALUES]=4 or 5 THEN 1 ELSE 0



      or something like this:


      IF [Question]="Q3" AND [DATA LABELS]="Much worse" or "Worse" THEN 1 ELSE 0



      Any ideas?