Forum Discussion

gauravnarchal's avatar
gauravnarchal
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

Average for Survey Result

Dear All,

How can I get the average (%) of the below table in PBI?

I wanted to get how many people are delighted, Very Satisfied, Satisfied & Dissatisfied.

 

  • gauravnarchal 

    maybe this Measure will satisfy your requirement

     

    Delighted % = 
    DIVIDE(
    (
     CALCULATE(COUNTROWS(Table), Table[Question 1] = "Delighted") +
     CALCULATE(COUNTROWS(Table), Table[Question 2] = "Delighted") +
     CALCULATE(COUNTROWS(Table), Table[Question 3] = "Delighted") +
     CALCULATE(COUNTROWS(Table), Table[Question 4] = "Delighted")
    )
    ,
     4 * CALCULATE(COUNTROWS(Table), ALL(Table) )
    )

     

     

  • az38's avatar
    az38
    6 years ago

    gauravnarchal 

    pick your new measures in the right pane, go to Measure Tools Ribbon and press "%" button

12 Replies

    • gauravnarchal's avatar
      gauravnarchal
      Icon for Post Prodigy rankPost Prodigy

      amitchandak Is there any other better option instead of unpivot?

       

      Can a measure {Average formula} handle this?

      • gauravnarchal's avatar
        gauravnarchal
        Icon for Post Prodigy rankPost Prodigy

        Is there any other better option instead of unpivot?

         

        Can a measure {Average formula} handle this?

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    gauravnarchal 

    whats exactly % do you need? by each question separately or by all amoun of data?

    for example you can create a few measures like

    Question 1 Delighted % = 
    DIVIDE(
    CALCULATE(COUNTROWS(Table), Table[Question 1] = "Delighted")
    ,
    CALCULATE(COUNTROWS(Table), ALL(Table) )
    )
    • az38's avatar
      az38
      Icon for Community Champion rankCommunity Champion

      gauravnarchal 

      maybe this Measure will satisfy your requirement

       

      Delighted % = 
      DIVIDE(
      (
       CALCULATE(COUNTROWS(Table), Table[Question 1] = "Delighted") +
       CALCULATE(COUNTROWS(Table), Table[Question 2] = "Delighted") +
       CALCULATE(COUNTROWS(Table), Table[Question 3] = "Delighted") +
       CALCULATE(COUNTROWS(Table), Table[Question 4] = "Delighted")
      )
      ,
       4 * CALCULATE(COUNTROWS(Table), ALL(Table) )
      )

       

       

      • gauravnarchal's avatar
        gauravnarchal
        Icon for Post Prodigy rankPost Prodigy

        az38  - It worked. The result is reflecting as 0.36 instead of 36%. How can I change the format to show in percentage?