Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jambopriti
Helper I
Helper I

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.

jambopriti_0-1729702371650.png

test data:

jambopriti_1-1729702490970.png

 

Respondent_idquestionanswer
5751How satisfied are you with the web site experience?Very Satisfied
5752How satisfied are you with the web site experience?Satisfied
5753How satisfied are you with the web site experience?Very Satisfied
5760How satisfied are you with the web site experience?Very Satisfied
5761How satisfied are you with the web site experience?Satisfied
5762How satisfied are you with the web site experience?Very Satisfied
5763How satisfied are you with the web site experience?Neutral
5764How satisfied are you with the web site experience?Very Satisfied
5767How satisfied are you with the web site experience?Very Satisfied
5769How satisfied are you with the web site experience?Satisfied
5770How satisfied are you with the web site experience?Very Satisfied
5772How satisfied are you with the web site experience?Satisfied
5775How satisfied are you with the web site experience?Very Satisfied
5776How satisfied are you with the web site experience?Satisfied
5778How satisfied are you with the web site experience?Very Satisfied
5779How satisfied are you with the web site experience?Very Satisfied
5780How satisfied are you with the web site experience?Very Satisfied
5781How satisfied are you with the web site experience?Satisfied
5783How satisfied are you with the web site experience?Very Satisfied
5785How satisfied are you with the web site experience?Satisfied
5787How satisfied are you with the web site experience?Neutral
5788How satisfied are you with the web site experience?Very Satisfied
5789How satisfied are you with the web site experience?Neutral
5790How satisfied are you with the web site experience?Very Satisfied
5791How satisfied are you with the web site experience?Very Satisfied
5792How satisfied are you with the web site experience?Neutral
5793How satisfied are you with the web site experience?Satisfied
5795How satisfied are you with the web site experience?Very Satisfied
5796How satisfied are you with the web site experience?Satisfied
5797How satisfied are you with the web site experience?Satisfied
5799How satisfied are you with the web site experience?Satisfied
5800How satisfied are you with the web site experience?Very Satisfied
   

 

 

3 ACCEPTED SOLUTIONS
fahadqadir3
Super User
Super User

@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]        
  )
fahadqadir3_0-1729703751199.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

Review the pbix file attached,

Top2ResponsesPercentage =

VAR TopNTable =

    TOPN(

        2,

        ALL('Table'[answer]),

        [COunt Answers %],        

        DESC

    )

RETURN

    SUMX(

      TopNTable,

        [COunt Answers %]        

  )

fahadqadir3_0-1729792769680.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

View solution in original post

Perfect! It is working! Thank you so much for your solution and support! 

View solution in original post

9 REPLIES 9
jambopriti
Helper I
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.

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.

@jambopriti no problem, share your sample data.

Hi, Here is the data. Thank you!

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
5801,How satisfied are you with the web site experience?,Dissatisfied
5802,How satisfied are you with the web site experience?,Dissatisfied
5803,How satisfied are you with the web site experience?,Dissatisfied
5804,How satisfied are you with the web site experience?,Very Dissatisfied
5805,How satisfied are you with the web site experience?,Very Dissatisfied
5806,How satisfied are you with the web site experience?,Very Dissatisfied
5807,How satisfied are you with the web site experience?,Very Dissatisfied

Review the pbix file attached,

Top2ResponsesPercentage =

VAR TopNTable =

    TOPN(

        2,

        ALL('Table'[answer]),

        [COunt Answers %],        

        DESC

    )

RETURN

    SUMX(

      TopNTable,

        [COunt Answers %]        

  )

fahadqadir3_0-1729792769680.png

 

 

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! 

@jambopriti Click on % Sign, 

fahadqadir3_0-1729704871450.png

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

Thank you so much!!! 

It is working. I'll mark this as a solution! Truly appreciate your help!

fahadqadir3
Super User
Super User

@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]        
  )
fahadqadir3_0-1729703751199.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.