Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm very new to Qlik and would appreciate any help. I have multiple choice survey data for several thousands of respondents being asked multiple questions. The data looks similar to this:
| RespondentID | QuestionID | Response |
| 0001 | 01 | A |
| 0001 | 02 | C |
| 0001 | 03 | D |
| 0001 | 04 | B |
| 0002 | 01 | D |
| 0002 | 02 | D |
| 0002 | 03 | C |
| 0002 | 04 | A |
| 0003 | 01 | A |
| 0003 | 02 | C |
| 0003 | 03 | D |
| 0003 | 04 | B |
I want to concatenate each Respondent's Response data based on the QuestionID order...
| RespondentID | QuestionID | Response | ConcatenatedResponses |
| 0001 | 01 | A | ACDB |
| 0001 | 02 | C | ACDB |
| 0001 | 03 | D | ACDB |
| 0001 | 04 | B | ACDB |
| 0002 | 01 | D | DDCA |
| 0002 | 02 | D | DDCA |
| 0002 | 03 | C | DDCA |
| 0002 | 04 | A | DDCA |
| 0003 | 01 | A | ACDB |
| 0003 | 02 | C | ACDB |
| 0003 | 03 | D | ACDB |
| 0003 | 04 | B | ACDB |
so I can export to Excel, remove duplicate RespondentIDs, and identify how many Respondents have the exact same responses across all questions:
| RespondentID | ConcatenatedResponses | SameResponseCount |
| 0001 | ACDB | 2 |
| 0002 | DDCA | 1 |
| 0003 | ACDB | 2 |
It takes way too long to export the data and have Excel process it. Is there a way to do this in Qlik before exporting?
Thanks!
Hi
yes it can be done in qlik sense. see attached qvf
Script
Responses:
LOAD
RespondentID,
QuestionID,
Response
FROM [lib://Downloads/Sample Table.xlsx]
(ooxml, embedded labels, table is Sheet1);
left Join (Responses)
load RespondentID, Concat(Response) As [Concatenated Response]
resident Responses
group by RespondentID;Chart
dimensions RespondentID, Concatenated Response
measure - Count(distinct total<[Concatenated Response]> RespondentID)
for more information on total qualifier
https://community.qlik.com/t5/Qlik-Design-Blog/What-does-the-TOTAL-qualifier-do/ba-p/1472990
Thank you, Dilipranjith. It appears I'm using Qlik View instead of Qlik Sense (I mentioned I was new). Is there a way to do the same thing within Qlick View to build a table that's already concatenated like I laid out?
You can use the same script and chart measure i shared