Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7491 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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!

Posted

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.

This topic is 7491 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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