Forum Discussion
Survey Analysis: Count and Add the response
Hi,
I'm new to Power BI and need help in Survey analysis.
I need to add count of top 2 responses. Would you please show how to do it?
I have attached the test file.
I'm trying to get this result.
test data:
| Respondent_id | question | answer |
| 5751 | How satisfied are you with the web site experience? | Very Satisfied |
| 5752 | How satisfied are you with the web site experience? | Satisfied |
| 5753 | How satisfied are you with the web site experience? | Very Satisfied |
| 5760 | How satisfied are you with the web site experience? | Very Satisfied |
| 5761 | How satisfied are you with the web site experience? | Satisfied |
| 5762 | How satisfied are you with the web site experience? | Very Satisfied |
| 5763 | How satisfied are you with the web site experience? | Neutral |
| 5764 | How satisfied are you with the web site experience? | Very Satisfied |
| 5767 | How satisfied are you with the web site experience? | Very Satisfied |
| 5769 | How satisfied are you with the web site experience? | Satisfied |
| 5770 | How satisfied are you with the web site experience? | Very Satisfied |
| 5772 | How satisfied are you with the web site experience? | Satisfied |
| 5775 | How satisfied are you with the web site experience? | Very Satisfied |
| 5776 | How satisfied are you with the web site experience? | Satisfied |
| 5778 | How satisfied are you with the web site experience? | Very Satisfied |
| 5779 | How satisfied are you with the web site experience? | Very Satisfied |
| 5780 | How satisfied are you with the web site experience? | Very Satisfied |
| 5781 | How satisfied are you with the web site experience? | Satisfied |
| 5783 | How satisfied are you with the web site experience? | Very Satisfied |
| 5785 | How satisfied are you with the web site experience? | Satisfied |
| 5787 | How satisfied are you with the web site experience? | Neutral |
| 5788 | How satisfied are you with the web site experience? | Very Satisfied |
| 5789 | How satisfied are you with the web site experience? | Neutral |
| 5790 | How satisfied are you with the web site experience? | Very Satisfied |
| 5791 | How satisfied are you with the web site experience? | Very Satisfied |
| 5792 | How satisfied are you with the web site experience? | Neutral |
| 5793 | How satisfied are you with the web site experience? | Satisfied |
| 5795 | How satisfied are you with the web site experience? | Very Satisfied |
| 5796 | How satisfied are you with the web site experience? | Satisfied |
| 5797 | How satisfied are you with the web site experience? | Satisfied |
| 5799 | How satisfied are you with the web site experience? | Satisfied |
| 5800 | How satisfied are you with the web site experience? | Very Satisfied |
jambopriti Review the following screenshot and measure. Hope it works.
COunt Answers = COUNT('Table'[answer])/CALCULATE(COUNT('Table'[answer]),All('Table'))
Top2ResponsesPercentage =
VAR TopNTable =
TOPN(
2,
ALL('Table'[answer]),
[COunt Answers],
DESC
)
RETURN
SUMX(
TopNTable,
[COunt Answers]
)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!Review the pbix file attached,
Top2ResponsesPercentage =
VAR TopNTable =
TOPN(
2,
ALL('Table'[answer]),
[COunt Answers %],
DESC
)
RETURN
SUMX(
TopNTable,
[COunt Answers %]
)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!Perfect! It is working! Thank you so much for your solution and support!
9 Replies
- fahadqadir3
Solution Supplier
jambopriti Review the following screenshot and measure. Hope it works.
COunt Answers = COUNT('Table'[answer])/CALCULATE(COUNT('Table'[answer]),All('Table'))
Top2ResponsesPercentage =
VAR TopNTable =
TOPN(
2,
ALL('Table'[answer]),
[COunt Answers],
DESC
)
RETURN
SUMX(
TopNTable,
[COunt Answers]
)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!! - jambopriti
Helper I
Thank you. one more question.
my card display 0.88, How do I convert into percentage? sorry this is so dumbquestion but I'm totally new to Power BI and learning.
- fahadqadir3
Solution Supplier
jambopriti Click on % Sign,
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!- jambopriti
Helper I
Thank you so much!!!
It is working. I'll mark this as a solution! Truly appreciate your help!
- jambopriti
Helper I
Hi,
Sorry, when I apply to real data I got the wrong calculation because my data may have
Very Satisfied, Satisfied, Neutral, Dissatisfied, very Dissatisfied.
Is there a way I can rank 5,4,3,2,1? my data model do not have the rank. How can I achieve this.
Sorry, I should have mention this.
- fahadqadir3
Solution Supplier
jambopriti no problem, share your sample data.