Customer Behavior: Analyze Survey Data


Surveys are a useful way to collect data from the people your organization serves, but the results can be challenging to visualize.

However, in Tableau Desktop, we can make survey data easier to consume by restructuring our data and visualizing it in a bar chart as follows.

image-20210706105022838

>> Practice

<< Goal >>

A survey about college campus security has done in a local university, the students were asked to answer each question with one of five responses, ranging from Strongly Agree to Strongly Disagree.

We would like to know

  • how the responses were distributed by the two campuses surveyed,

  • the average response to each question,

  • and to see what areas of security need attention.


<< Process >>

[STEP 1] Pivot the five questions: transpose data from columns to rows

  • Select the five questions fields --> Right-click --> Pivot

    image-20210706124325253
  • Rename the new fields “Question” and “Responses”

    image-20210706124455189

[STEP 2] First looking at the data as a whole

Show the total percentage of responses:

  • Drag Responses to Columns --> Change the aggregation to Count --> Add a [Percent of Total] Quick Table Calculation

  • Change the axis title and format the label so it does not display decimal places

    image-20210706125857806

[STEP 3] Break down the responses by Campus and Questions

image-20210706130527510

[STEP 4] Color the bars by Responses

  • Make a copy of the [Responses] field, convert it to a dimension, and rename it [Responses (dimensions)]

    image-20210706131323482
  • Color the view by [Responses (dimension)] and rename the aliases to match the survey

    image-20210706131814108 image-20210706131939248

  • Edit legend colors and change the title to Responses

    image-20210706132303482

[STEP 5] Calculate the average response to each question

  • Create a calculated field, fixed on Campus and Question, to determine the average response

    [Average Response] :

    { FIXED [Campus], [Question] : AVG([Responses]) }


  • Add [Average Response] to rows, make it discrete, and format it so it has one decimal place

    image-20210706133302359