Forum Discussion

Cheryle2175's avatar
Cheryle2175
Copper Contributor
Apr 07, 2020

Need help. Pivot table average adding decimal places to whole number

Greetings,

I am using a pivot table to compute the average of a list of whole number (ratings 1-5).  The pivot table average is returning fractional values so rather than 5, returning 4.63 for example.  I am wanting the average to be returned as a whole number.

8 Replies

  • gyankosh's avatar
    gyankosh
    Brass Contributor

    Cheryle2175 

     

    No, you can achieve this.

     

    What I got from your problem.

    You are averaging the ratings, but its coming out to be in decimal. You want in a whole number.

    If 2.4 then 2 if 4.6 then 5. If its the case . Just follow this

     

    source:https://gyankosh.net/msexcel/how-to-use-pivot-tables-in-excel/#gsc.tab=0e

    When you go to the field settings, the picture shown above comes up.

    Just go to number format and choose one without the decimals.

    Your problem is solved.

    *If it was what I understood.

     

    • Cheryle2175's avatar
      Cheryle2175
      Copper Contributor

      gyankosh  Hi, thank you for the response.  I follow you, however, the issue is that when the value is graphed it is graphed with the decimal not as a whole number.

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Cheryle2175 Difficult to follow what you are trying to achieve, but your formula seems to return the NUMBERVALUE of texts varying from "1", "2","3","4" and "5". Why not just skip the "numbervalue" and use the values 1, 2, 3, 4 and 5 in your formula to begin with?

     

    Perhaps you can upload a sample of your workbook with the PT in it so that we can see how your formula affects the PT.

    • Cheryle2175's avatar
      Cheryle2175
      Copper Contributor

      Riny_van_Eekelen 

      I over complicated the ask above.  Here is the simple version: I am using a pivot table to compute the average of a list of whole number ratings 1-5.  The pivot table average is returning fractional values so rather than 5, returning 4.63 for example.  

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        Cheryle2175I guess this is a matter of number formatting. Assuming that the ratings are in the Value area of the PT, and you have set the action to "Average" (i.e. not Sum or Count, for example). Here you can also change the number format. Set it to a number with 0 (zero) decimals. In your case, the real average is still 4.63 but it will show as 5.

         

Resources