Help with creating averages field

Pis7ftw

Registered User.
Local time
Today, 07:18
Joined
Aug 5, 2012
Messages
37
Hello!

I'm creating a report based off a query. The report lists all of the fields specific to that query. I have one field that is technically a text field under the table design but displays yes/no/not applicable.

On the report, it takes all reports with "Yes" listed and displays the result in a text box. It takes all reports with a "No" field and displays the result in a text box underneath the "yes" text box. Then underneath both of those textbox, I have an expression that displays how many reports there are in the query.

I'm looking for an expression that divides the "Yes" results into the total records to display a percentage of Yes values vs the No values.

I'm having trouble figuring out the syntax with expressions. VB seems like cake compared to these!
 
Perhaps add a textbox and set the control source to =count([FieldNameYes]) and then another for FieldNameNo does this then give you the correct totals? If so then you should be able to do an Average from there.
 
Something like this for Yes vs No:
Code:
=(Count(IIF([Field] = "Yes", 1, Null)) / Count(IIF([Field] = "No", 1, Null))) * 100
 

Users who are viewing this thread

Back
Top Bottom