Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

In order to properly calculate student GPAs in a report, I need to total a field called 'credit hours' and a field called 'hours' and divide them as needed.

student-----CH---H

student 1 - 16 - 4

student 1 - 04 - 1

student 1 - 04 - 1

Student 1: 24 - 6 (24/6 = GPA of 4 for this student)

student 2 - 03 - 1

student 2 - 12 - 4

student 2 - 08 - 4

Student 2: 23 - 9 (23/9 = GPA of 2.56 for this student)

Class Tot: 47 - 15 (47/15 = classGPA of 2.86 for this class)

The problem I'm having is with the class GPA calculation (shown only in parentheses above). I need to take the total CH and divide it by total H when the class break happens in the report.

I have two summary fields, totalCH and totalH, that work just fine.

So I have a calculation that looks like this (simplified here)B)

classGPA = Round(GetSummary(totalCH,class)/GetSummary(totalH,class),2)

Now here is what I consider to be a bug:

If the class field is local to the file where I'm doing the report, the class GPA is correctly calculated.

But if I use a related field for the GetSummary break field, i.e.,

classGPA = Round(GetSummary(totalCH,student::class)/GetSummary(totalH,student::class),2)

then I get nothing at all for classGPA. The field is blank, not zero or some other number.

The fact that totalCH and totalH are correct, even when breaking on student::class, indicates to me that my logic is correct but that FMP has a bug here.

I could appreciate confirmations of my reasoning, refutations of same, and workarounds!

-- jeffreyp

Posted

If a relational system is used where Students are in one file and their hours are in recorded in another, this would be really easy to do with a calculation field like Sum(Relationahip:field).

No neeed for summary parts or calculations.

  • Newbies
Posted

Thanks for the tip, Vaughan! I must admit that I'm not sure how I would use it since the actual GPA calculation is:

GPA = ((Sum(Hours of A work) * 4) + (Sum(Hours of B work) * 3) + (Sum(Hours of C work) * 2) + (Sum(Hours of D work) * 1))/ Sum(Hours)

I suppose I could figure out a way to make a relationship "Hours of A", "Hours of B", etc. And I need to break the report at three levels, so I'm even less sure.

But I actually solved my problem by copying the field I needed into the table where the report lives.

However, I would still like to know whether I've uncovered a FileMaker Pro bug with GetSummary() or not. I bet I have.

--jeffreyP

This topic is 7914 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.