How to Display/Calculate Ranked Answers

Hi, I’m creating a dashboard in QS and need assistance with a visual. The goal is to display survey responses ranked by popularity. The survey has one question with four options (in-person, virtual, e-learning, or other). I want to create a chart that shows these options ranked from the most to the least selected. Could someone advise on the best approach to achieve this in QS? I tried the CountOver calc but it didn’t work quite right.

Thanks for any assistance!

Hi @QS-chev
could you share some more details? How do you data look like and the countOver you tried so far.
BR

2 Likes

Hi ErikG,

The data is in Excel form, set up like the below snapshot. This is how the respondents ranked their preference. For example, Respondent #1 ranked their preferences as 1). Virtual, 2). In-Person, 3). eLearning & 4). Other. I’m trying to work out how to show these rankings in a bar chart in QS (assuming a bar chart is the best way to show it, I’m open to other suggestions as well). The chart should show the most popular answer, 2nd popular, etc. Initially, I tried the CountOver function using countOver([“Preferred method of learning - In-Person, speaker”], , PRE_AGG) but I don’t think this is what I just kept getting an error message: At least one of the arguments in this function does not have correct type. Correct the expression and choose Create again. So the CountOver function may not be the best way to calculate what I need.
Thank you for your help!
image

Hi @QS-chev,

One option could be to pivot the dataset (I’ve converted your example below), so that each line represents a single respondent’s rank for each Type of learning option.
This would then make it simple to build a bar chart visual that displays the average rank for each option, e.g.

Is pivoting the data in this way an option, prior to bringing the data into QuickSight?

Many Thanks,
Andrew

Respondent Type Rank
1 eLearning 3
2 eLearning 3
3 eLearning 1
4 eLearning 3
5 eLearning 1
6 eLearning 2
7 eLearning 2
8 eLearning 3
9 eLearning 3
10 eLearning 2
11 eLearning 1
1 Virtual 1
2 Virtual 2
3 Virtual 2
4 Virtual 2
5 Virtual 2
6 Virtual 1
7 Virtual 3
8 Virtual 2
9 Virtual 1
10 Virtual 1
11 Virtual 2
1 In-Person 2
2 In-Person 1
3 In-Person 3
4 In-Person 1
5 In-Person 3
6 In-Person 3
7 In-Person 1
8 In-Person 1
9 In-Person 2
10 In-Person 3
11 In-Person 3
1 Other 4
2 Other 4
3 Other 4
4 Other 4
5 Other 4
6 Other 4
7 Other 4
8 Other 4
9 Other 4
10 Other 4
11 Other 4
2 Likes

Yes it is. Thank you so much Andrew. I appreciate your help!

1 Like