6 Replies Latest reply on May 24, 2016 7:34 AM by Kyle Rance

# Help with in-table percentage calculation

Hi Guys,

I am trying to create a percentage figure between a count of distinct Yes/No's within a column.

I've create the table below: Instead of the No / Yes figures displayed I would like to work out the percentage of Yes's compared to No's. E.g. 808 / 53,870 would read 1.49%.

I'm sure its an easy calculated field but I'm a complete newbie, so appreciate the help!

Regards!

• ###### 1. Re: Help with in-table percentage calculation

create a calculated field along the lines of:

COUNTD(IF [Responder Flag] = 'Yes' THEN [FieldToCount] END)/COUNTD(IF [Responder Flag] != 'Yes' THEN [FieldToCount] END)

Remove the Responder Flag from the Columns shelf and put that new calculated field in the text shelf. Should work, fingers crossed.

1 of 1 people found this helpful
• ###### 2. Re: Help with in-table percentage calculation

Hi Kyle,

I think this should work. Create these 2 calcualations. Call the first one "Count of Yes"

COUNTD(IF [Responder Flag]="Yes" THEN [Responder Flag] END)

Call the second one "Count of No":

COUNTD(IF [Responder Flag]="No" THEN [Responder Flag] END)

And finally your % calculation will look like this:

[Count of Yes]/[Count of No]

And then convert that to a percentage and I think that will do the trick. Let me know how this works out.

Stephen

Edit: I removed the SUM from in front of my final calculation as it is already an aggregate!

• ###### 3. Re: Help with in-table percentage calculation

That's worked, genius! Thank you for your help and the quick response.

• ###### 4. Re: Help with in-table percentage calculation

Actually ignore my response, Andrew Watson is right! It's not a COUNTD of the [Responder Flag], it's whatever field you're trying to count.

• ###### 5. Re: Help with in-table percentage calculation

Thanks for your help!

• ###### 6. Re: Help with in-table percentage calculation

yup Andrew's solution worked a treat!