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.

Calculating averages

Featured Replies

I have a table of students' marks.

Is there a way that I can calculate the average mark? Do I need to create a separate table of the average? Do I use the function average() to make the calculation? How does it work across records? Each record just has one mark. So I need to calculate the average by summing all the records and dividing it by the number of records. How can I do this?

Thanks for any help, and the help I've had in the past.

Add a summary field to the table called "average mark". Choose "average" as the type of summary, and base it on your mark field (which must be a number field).

The summary field will show the average of all the records in your current found set. If you're looking at all records, it will be the average over all students, for example.

  • Author

Wow! Excellent!! Thanks ever so much for your help. Now I have a further question. I've used this formula to calculate averages in various different courses. It seems to work fine by using a summary field in each record to calculate the average. I also want to be able to print off the records like a transcript. When I reference the average mark, however, it is referring to the mark by that individual, not the total average.

Eg.

Student1 has a midterm mark of 63, a final of 74, and the class average is 83. When I display the transcript it says:

Student1 63 74 74

------------------^

So 74 is seen as the average, even though that is just the final mark of the student not the average. The mark does reference ::avgFinal1 however.

<Student1> <midterm1> <final1> <avgFinal1>

What am I doing wrong?

Thanks so much!

canadiandude007,

As I mentioned, the summary will show the average of your found set, if you are looking at only a single student's scores you will only see their average.

Here's a sample file that adds a new self-relationship to the graph that makes any record able to see all students in the file. Referencing that summary field will always show the average of everyone in the database.

If you wanted to show only the average of all students just in the same class, you would change the relationship to be based on classId=classId, for example. You might call this table occurence in the graph, "ClassMates" for example, so you can quickly determine what it does.

Hope that helps.

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.