Forum Discussion

jambopriti's avatar
jambopriti
Helper I
1 year ago
Solved

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....
  • fahadqadir3's avatar
    1 year ago

    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!!

  • fahadqadir3's avatar
    fahadqadir3
    1 year ago

    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!!

     

  • jambopriti's avatar
    jambopriti
    1 year ago

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