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 4703 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a mileage field in a table and a summary field (count = mileage) that sorts on the TableNameID field and it works fine. However I only want the summary to count mileage when the field Report Printout = Yes. I thought the way to solve this is to create a global mileage field with the value = Yes and add another table occurence of the table I'm working in to the graph and use Report Printout = global mileage and then use the new relationship in the original summary field when restarting the count. I can't seem to get it to work though.

Posted

Create a calculation ( number ) with: Case ( Report Printout = "Yes" ; mileageField )

Base your summary field on this calculation instead. :^)

Posted

Create a calculation ( number ) with: Case ( Report Printout = "Yes" ; mileageField )

Base your summary field on this calculation instead. :^)

No need for a global field and another TO then?

Posted

No, from what I understand, you do not need another table occurrence. Summary fields act on the table they are created in and they summarize every record which has a value in the field specified if that record is in the found set. And you said:

I have a mileage field in a table and a summary field (count = mileage) that sorts on the TableNameID field and it works fine.

... so you do the same thing except you create a calculation which only outputs the mileage if Report Printout = Yes. Maybe call it CReportMileage as:

Case ( Report Printout = "Yes" ; mileageField )

How you define that calculation criteria does not matter. You can use a global field which contains 'yes' (it can reside in any table) and it will be evaluated as 'yes' in every record because calculations act at the record level. What matters is that the summary field will 'do its business' on the record set depending upon the values output from the calc results - IOW, mileage total only when specified.

So a new summary field, maybe called sCountReportMileage (Count = cReportMileage) will, in essence, filter the mileage value before you summarize it.

Posted

So a new summary field, maybe called sCountReportMileage (Count = cReportMileage) will, in essence, filter the mileage value before you summarize it.

Super explanation thank you very much. To get the desired result I had to change (Count = cReportMileage) to (Total = cReportMileage).

Posted

That is why wording is so very important - both in asking the question and answering:

"I have a mileage field in a table and a summary field (count = mileage). I only want the summary to count mileage when the field Report Printout = Yes."

I should have realized and asked for verification. I am pleased that you worked it out. :thumbsup:

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