Structuring Libqual data for Tableau

30 views
Skip to first unread message

Laura Baker

unread,
Jul 8, 2025, 3:07:02 PMJul 8
to arl assess
I'm a relatively new assessment librarian.  I'm trying to learn how to use Tableau to analyze our most recent LibQual results.  I'm hoping someone can give me some guidance about how to structure the data for analysis.

I know Tableau prefers "long and skinny" sheets rather than short and broad.  I think I need to pivot the raw data to show something like this:

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

Instead, I get only two columns when I try to pivot, resulting in the following:

Question Response
AS01 mn 4
As01 de 9
AS01 pr 7
IC02 mn 9
IC02 de 9
IC02 pr 8


Am I correct in thinking the first example is how I need to structure the data, or am I way off?

Libqual and Tableau are such frequently used tools in libraries that I'm sure this issue has been addressed before.  It feels like a very basic question.  I'd welcome some tips from those of you more experienced or being pointed to some internal instructions you've developed.

Laura
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laura Baker
Librarian -- User Experience and Assessment
Abilene Christian University Library
221 Brown Library / ACU Box 29208
Abilene, TX  79699-9208

bak...@acu.edu
phone: (325) 674-2477
fax:   (325) 674-2202
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





Croxton,Becky

unread,
Jul 9, 2025, 10:39:22 AMJul 9
to arl assess, Laura Baker
Hi Laura,

I saw your message on the ARL Listserv. I think the setup of your LibQual+ data as show in your first screenshot looks great for being able to analyze. I recreated your example and put together a sample pivot table to show you how I might go about summarizing the data.  (Also attached as an Excel file.) You can easily recreate this same summary in Tableau with your data set up. 

Feel free to reach out directly with any questions.

Best,
Becky
 



______ 

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 

P: (970) 491-1116 

Email: becky....@colostate.edu


Ram head logo in white on green circle with "Libraries" above "Colorado State University"





From: 'Laura Baker' via ARL ASSESS <arl-a...@arl.org>
Sent: Tuesday, July 8, 2025 1:06 PM
To: arl assess <arl-a...@arl.org>
Subject: [ARL-ASSESS] Structuring Libqual data for Tableau
 

** Caution: EXTERNAL Sender **

--
To post to this group, send email to arl-a...@arl.org
To unsubscribe from this group, send email to arl-assess+...@arl.org
For more options, visit https://groups.google.com/a/arl.org/d/forum/arl-assess?hl=en
For instructions on logging in visit https://sites.google.com/a/arl.org/techguides_arl/login.
Discussions on this list are subject to ARL's Code of Conduct: https://www.arl.org/who-we-are/#section-codeofconduct.
To unsubscribe from this group and stop receiving emails from it, send an email to arl-assess+...@arl.org.
LibQual+ Example.xlsx

Martha Kyrillidou

unread,
Jul 9, 2025, 11:26:12 AMJul 9
to Croxton,Becky, arl assess, Laura Baker
Hi Laura [and Becky], I think you are trying to recreate the blue version of Becky's spreadsheet if I am not mistaken.  Are you starting with the spss version of the data or an excel export?  Depending on your starting point there are probably different pathways in Tableau.  I am also trying to bring the historical data into Tableau so maybe we can brainstorm on the most efficient pathways as we move forward. 

If there are others out there that want to join our conversation, please let us know!

Kind regards, Martha
Martha Kyrillidou, PhD, MEd, MLS | QualityMetrics, LLC | Helping Libraries Achieve Success

I work flexibly - so whilst it suits me to email now, I do not expect a response or action outside of your own working hours.



Martha Kyrillidou

unread,
Jul 9, 2025, 11:40:36 AMJul 9
to Croxton,Becky, arl assess, Laura Baker
And here are some Tableau public dashboards for additional inspiration - 



Martha Kyrillidou, PhD, MEd, MLS | QualityMetrics, LLC | Helping Libraries Achieve Success

I work flexibly - so whilst it suits me to email now, I do not expect a response or action outside of your own working hours.



andrew....@gmail.com

unread,
Jul 9, 2025, 11:48:52 AMJul 9
to Martha Kyrillidou, Croxton,Becky, arl assess, Laura Baker

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

image001.png
image002.png

Laura Baker

unread,
Jul 9, 2025, 7:54:11 PMJul 9
to andrew....@gmail.com, Martha Kyrillidou, Croxton,Becky, arl assess
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.

Here is the raw data that LibQual provides.  I opened it in Excel.  I've shortened the number of rows and hidden some of the columns to make it more readable, but I think this sample shows the pattern of how the data is stored in its raw state:

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

 As you can see above, each row represents a respondent (as represented by a unique DataID and User ID).  The next couple of columns are demographic data.  Columns AS01_xx through IC02_xx are questions.  AS01 is a question with a range representing minimum, desired, and perceived levels.  IC02 is the next question with the same three facets representing minimum, desired, and perceived.

Looking at other Libqual visualizations on Tableau confirms that most people have reshaped the dataset to look like the following:

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

It appears to be a pivot on the questions and responses.  Many of you confirmed that a pivot is what you do for surveys, and I appreciate that confirmation.  It all makes me think that example two is in fact the way to reshape the data.

Here's where I am stuck.  I can't get the pivot to result in the right pattern.  When I load the raw data sheet pictured in the first example into Tableau, I selected columns AS01_xx through IC02_xx, right clicked, and selected Pivot.  Here's what I got:

image.png

You can see that the tableau pivot produces one question column and one column for the response.  Somehow I've got to have separate categories for the response based on type (mn, de, pr).

Maybe the problem is that the Question field really has two things it is communicating:  the Question (AS01, IC02) as well as the category of the responses (mn, de, pr).  I don't know how to split those out for each question.  I managed to do it manually in Excel, but only by dint of sheer effort.  I had to split each question into a separate sheet, do a lot of filtering, then copy the results back into a combined data sheet with the columns and rows as desired.  I had to do it for every question, and there are over 22 questions and hundreds of rows.  The notion of going through all this every time we do a libqual survey is demoralizing.  There's got to be a more efficient way.  I know libraries have regularly used both Tableau and Libqual and have probably already addressed this question without my having to reinvent the wheel.  

As I said, I am practically a total newbie to Tableau, so I can easily believe that I am missing something obvious.  I really appreciate the responses so far.  If anyone has some insights, please share.

Laura
 

andrew....@gmail.com

unread,
Jul 9, 2025, 8:53:23 PMJul 9
to Laura Baker, Martha Kyrillidou, Croxton,Becky, arl assess

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.

image001.png
image002.png
image003.png
image004.png
LibQual Example.twb

Gina Petersen

unread,
Jul 10, 2025, 10:31:32 AMJul 10
to andrew....@gmail.com, Laura Baker, Martha Kyrillidou, Croxton,Becky, arl assess

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

gina.p...@northwestern.edu

 

 

 

 

Angela Zoss, Ph.D.

unread,
Jul 10, 2025, 10:47:25 AMJul 10
to Laura Baker, Martha Kyrillidou, Croxton,Becky, arl assess, andrew....@gmail.com

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>

Reply all
Reply to author
Forward
0 new messages