4 Replies Latest reply on Apr 6, 2016 12:41 AM by Vivian Perceval

# Formula to display entry type as a proportion of the total

I have a column in a spreadsheet entitled "feedback" with either negative or positive listed. Displaying a count of this appears fine, but the following formula returns 0 for every entry:

count( if [feedback] = "positive" then 1 else null end)/count([feedback])

I am trying to display the count of positive feedback as a proportion of the whole.

I'm predicting the issue is something very simple in the syntax I'm using but I can't see what... Any help?

• ###### 1. Re: Formula to display entry type as a proportion of the total

try: sum( if [feedback] = "positive" then 1 else 0 end)/count([feedback])

Make sure the capitalisation for the word "positive" is exactly like that in the data.

• ###### 2. Re: Formula to display entry type as a proportion of the total

Hi Vivian, see this screenshot below. You want to use a table calculation to accomplish this. Basic table calculations are available from this menu--no formula writing required.

More on table calcs here • ###### 3. Re: Formula to display entry type as a proportion of the total

Thanks a bunch Andrew, this worked in the end- of course it's 'sum' not 'count' I want at the beginning! And you were right, I hadn't capitalised the 'P'.

Oddly this solution didn't work at first, but when I changed the '%' in the title to 'percentage' it started working and still worked when I changed it back to '%'.

Thanks again.

• ###### 4. Re: Formula to display entry type as a proportion of the total

Thanks Andrew, I'm sure this works as well, though I couldn't see how to get just a count of 'positives' as a proportion of the total, I ended up with all 1's and 0's for some reason. Thanks for the heads up about table calcs though, I'll watch some videos etc and learn more about them as a long term solution..