5 Replies Latest reply on Nov 18, 2013 10:36 AM by Alex Kerin

# Questionnaire / Survey Data and Calculations

I am still learning the Tableau language so I apologize if I sound a bit elementary or confusing. I appreciate any feedback.

Kevin

• ###### 1. Re: Questionnaire / Survey Data and Calculations

Hi Kevin,

What I've done with my survey data (HCAHPS and CGCAHPS) is to have an associated dimension table that indicates the type of question (Likert Scale, Yes/No, etc.). The query that is used as the Tableau data source joins to the dimension table to get the Question Type, then I have calculated fields that do whatever is necessary for that question type.

Also, if you haven't seen Steve Wexler's series of posts on analyzing survey data with Tableau at Data Revelations | Visualizing Survey Data, they are a tremendous resource.

• ###### 2. Re: Questionnaire / Survey Data and Calculations

I like that idea of the dimension table Jonathon, especially if it also held question number (it they are not in the survey). Otherwise you end up with an alphabetical list of questions.

Ditto on the 4 part series by Steve W - very good indeed.

• ###### 3. Re: Questionnaire / Survey Data and Calculations

Hi Kevin,

I see you've gotten some good suggestions already. I convert responses on questions where I'm going to need to do multiple analysis into numbers before reshaping -- then I create  "Response" table that provides aliases for numeric responses that represent a test answer (i.e. "all the time", "lacrosse", etc.). That way I can work with the data in multiple ways because it's all numeric.

• ###### 4. Re: Questionnaire / Survey Data and Calculations

I kind of get round that by including a number as part of the likert answers, then using a calc to pull that out. This calc also allows for yes/no answers:

Float(

if Left([Response],3) = "Yes" then str([Likert Center (if even responses, will be x.5)]+1)

elseif Left([Response],2) = "No" and len([Response])=2 Then str([Likert Center (if even responses, will be x.5)]-1)

elseif Left([Response],3) = "Not" then str([Likert Center (if even responses, will be x.5)])

elseif [Response] ="1st" then "3"

elseif [Response] ="2nd" then "2"

elseif [Response] ="3rd" then "1"

elseif mid([Response],2,1)="0" or mid([Response],2,1) = " " then Left([Response],2)

else Left([Response],1) end

)

• ###### 5. Re: Questionnaire / Survey Data and Calculations

I will also create custom calcs for individual questions.