Question | Mn | De | Pr |
AS01 | 4 | 9 | 7 |
AS01 | 4 | 9 | 7 |
AS01 | 4 | 9 | 8 |
IC02 | 9 | 9 | 8 |
IC02 | 7 | 7 | 8 |
IC02 | 9 | 9 | 9 |
Question | Response |
AS01 mn | 4 |
As01 de | 9 |
AS01 pr | 7 |
IC02 mn | 9 |
IC02 de | 9 |
IC02 pr | 8 |
______
Becky Croxton, Ph.D.
Pronouns She/Her (Why pronouns?)
Assessment & Research Analyst
Colorado State University Libraries
Morgan Library | 1019 Campus Delivery | Fort Collins, CO 80523
Email: becky....@colostate.edu
** Caution: EXTERNAL Sender **
Hi Laura,
For survey data organized by respondent, you typically want to pivot in tableau on every question column but not any demographic columns. This will create a data structure where every question answer for each respondent has 1 line and the questions themselves become a variable in their own column. This is confusing to type out but here is a post that demonstrates it: https://www.tableau.com/blog/prepare-survey-data-analysis-three-easy-steps-83122
This allows you to get multiple questions in the same table. However, if you have data coded on different scales, be careful with renaming (aliases in tableau), as it will apply to all the answers (in this case you can write calculations to new create new variables).
When I work with surveys I usually load 2 versions of the data source. One unpivoted and one pivoted. When I want to analyze a single question it is faster to work with the unpivoted version, but if I want to look at questions together it is easier to use the pivoted version.
Hope this helps,
Andrew
-----------------------------------------
Andrew Asher, PhD
Director, Organizational Research
Indiana University Libraries
DataID | UserID | DiscID | DiscLOCA | UGroupID | RoleID | AS01_mn | AS01_de | AS01_pr | IC02_mn | IC02_de | IC02_pr |
27 | 15828195 | 486 | 296921 | 521 | 296891 | 7 | 7 | 7 | 6 | 7 | 6 |
28 | 15828211 | 495 | 296940 | 521 | 296890 | 4 | 7 | 5 | 4 | 7 | 5 |
DataID | UserID | DiscID | DiscLOCA | UGroupID | RoleID | Question | mn | de | pr | per | ad | pr2 |
27 | 15828195 | 486 | 296921 | 521 | 296891 | AS01 | 7 | 7 | 7 | 0 | 0 | 7 |
28 | 15828211 | 495 | 296940 | 521 | 296890 | AS01 | 4 | 7 | 5 | 0 | 1 | 5 |
27 | 15828195 | 486 | 296921 | 521 | 296891 | IC02 | 6 | 7 | 6 | 0 | 0 | 6 |
28 | 15828211 | 495 | 296940 | 521 | 296890 | IC02 | 4 | 7 | 5 | 0 | 1 | 5 |
Hi Laura,
I haven’t worked with LibQual specifically, and a more elegant solution is writing a script outside Tableau to reformat the data.
But, you can do this in tableau with some calculated fields.
Create 3 calculated fields based on your pivot field names:
Question = LEFT([Pivot Field Names],4)
Category = Right([Pivot Field Names],2) **Edit** I realized after I typed this all out that there are sometimes 2 and 3 characters for the category—you’ll have to edit this formula to search for the space and then return the rest of the string. I don’t want to re-do everything but the principle is the same : )
Unique Value (this is just used to force tableau into not aggregating) =[Question]+Str([User ID])
Then format the table like this:
Right click on the Unique Value Pill and uncheck show header (this will hide it. Right click on category in the table and hide it as well.
You can then export crosstab to excel and you should have what you want.
I’m attaching the tableau workbook as well.
Cheers,
Andrew
From: Laura Baker <bak...@acu.edu>
Sent: Wednesday, July 9, 2025 7:54 PM
To: andrew....@gmail.com
Cc: Martha Kyrillidou <martha.k...@gmail.com>; Croxton,Becky <becky....@colostate.edu>; arl assess <arl-a...@arl.org>
Subject: Re: [ARL-ASSESS] Structuring Libqual data for Tableau
Thanks, Martha, Becky, and everyone else. I've been studying your suggestions and also looking at some other examples on public.tableau.com. Perhaps it would clarify what I'm trying to do if I show a little more of the data.
Hello,
If you don’t want to create calculated fields, you can use Tableau’s grouping function.
For large surveys like this, I generally create a helper file or tab that links questions and text. See: https://www.datarevelations.com/surveyjustso/. While this discusses various tools, I only use excel and link by question ID in tableau. (Note: There are also videos and a white paper. However, this series of blog posts is a decade old. You may come across something in the actual viz explanation parts that looks different now.)
This helper file (connected to the data by question id) lets me create a tab in Tableau that lays out all the questions and possible answers. For each question, I start with a blank sheet, filter to a single question, and then work on analysis.
However, for you: The help file needs separate columns to link question number to both the text and the type of rating. You might want to filter to only one type of rating and pull in the data (to compare that way).
Good luck. I hope this helps.
-Gina
--
Gina Petersen (she/her)
Assessment Librarian
Liaison to Radio TV Film
Northwestern University Libraries
Northwestern University
Hi Laura,
I think a solution that is a bit more straightforward than Andrew’s is to use a Split instead of LEFT() and RIGHT(). You can do this right from the Data Source tab if you click on the arrow for “Pivot Field Names”:
Split will create two separate fields, splitting on the space between the question name and the category of the response. Then, with those two fields, you can do what Andrew suggested to get a table view that arranges each category into separate columns. After the split, you can hide the original combined column if you don’t need it.
If you really want the categories in individual columns as the native data structure, like the example dataset you shared, it’s harder to do that just with Tableau. After the split, you would basically need to “un-pivot” the category column (change it from one column to three), but Tableau doesn’t have that option built in. You could do it in Tableau Prep, if you have that, or in Excel. If you use Excel’s Power Query, you can actually do all of these same transformations (and more) before you even get into Tableau.
I think the main reason to do the extra unpivot would be if you ever need to calculate something like a difference between desired and perceived. That would be a lot less straightforward if you just do the pivot in Tableau, but if you don’t care about that or are comfortable trying to do that calculation inside a Tableau table view, that might not matter. Personally, I have decided over the years to try to do as much data transformation outside of Tableau as possible. Using Tableau Prep or Power Query makes transformations much more reproducible, and I don’t have to try to document or remember all of the clicks I had to make in Tableau for something to work.
--
Angela M. Zoss, Ph.D. (she/her/hers)
Head, Assessment & User Experience Strategy department
Duke University Libraries
Phone: 919-684-8186
Email: angel...@duke.edu
From:
andrew....@gmail.com <andrew....@gmail.com>
Date: Wednesday, July 9, 2025 at 8:53
PM
To: 'Laura Baker' <bak...@acu.edu>
Cc: 'Martha Kyrillidou' <martha.k...@gmail.com>, 'Croxton,Becky' <becky....@colostate.edu>, 'arl assess' <arl-a...@arl.org>