Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

accurate averages

Featured Replies

I would like to report average age for male and female in a class in a school.

I would like to see the numbers side by side in a report showing stats for school, sub stats for class. But the average function is not accurate because it is summing all the students.

I unterstand that I could run a gender sort first but that would duplicate the report and make it visual hard to see male vs femail data.

You will need four calculated fields:

IsMale:

=(Gender="m")

IsFemale:

=(Gender="f")

MaleAge:

=StudentAge * IsMale

FemaleAge

=StudentAge * IsFemale

Then create two weighted average summary fields:

FemaleAverageAge:

Average of FemaleAge weighted by IsFemale

MaleAverageAge:

Average of MaleAge weighted by IsMale

  • 2 weeks later...
  • Author

thanks Bob you just saved me from created some sad looking reports.

The IsFemale and IsMale were not available for use in the weighted area. However, MaleAge and FemaleAge were and seem to work as you thought they other should.

Lee confused.gif

It will work as long as the calc field results are defined as number.

IsMale and IsFemale are logical calculations with a result of 0 or 1.

Looking back on this now though, I see that I did make it more complicated than necessary. You don't need the FemaleAge or MaleAge calculated fields at all. You just define the summary fields as:

FemaleAverageAge:

Average of Age weighted by IsFemale

MaleAverageAge:

Average of Age weighted by IsMale

smile.gif

> It will work as long as the calc field results are defined as number.

>

> IsMale and IsFemale are logical calculations with a result of 0 or 1.

I had these with a result = text, changing them to = number did the trick.

>

> Looking back on this now though, I see that I did make it more complicated

> than necessary. You don't need the FemaleAge or MaleAge calculated fields at

> all. You just define the summary fields as:

Yep, changing the calculations now allows the access to IsFemale and IsMale.

>

> FemaleAverageAge:

> Average of Age weighted by IsFemale

> MaleAverageAge:

> Average of Age weighted by IsMale

Assuming a typo here, Age should be StudentAge in keeping with the original calculations.

Thank you Bob, I appreciate your sharing this with us.

Lee

smile.gif

Yes it was a typo. Age should be StudentAge.

  • Author

thanks that worked perfect

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.