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

Recommended Posts

  • Newbies
Posted

I have a table whose records are shown as portal.  One of the fields is populated with a "Yes" or "No" and that depends on whether it is complete or not.  I'd like to have a separate field that gives me the percentage of completed tasks (Number of records with a Yes / Total Number of Records * 100).    Thanks for the help.

Posted

Try

PatternCount ( List ( otherTable::completed ) ; "Yes" ) / Count ( otherTable::primaryKey) * 100 

Having said that, it may be better to define the "completed” field as number field, and use a checkbox with a value list of 1, where a check (value of 1) indicates the task(?) is completed. Then your calculation is 

Sum ( otherTable::completed? ) / Count ( otherTable::primaryKey) * 100 
  • Newbies
Posted

Great.  Thanks for your help.  I had done something like this and was able to get it.  Now just have to figure how to get the calculation to be applied every time the finished field is set from yes to no or vice versa..... I tried doing it with ExecuteSQL as follows:

 

ExecuteSQL ("SELECT COUNT (Finished) FROM Job_History_Task where Finished='Yes'" ; "" ; "") / ExecuteSQL ("SELECT COUNT (RecordID) FROM Job_History_Task" ; "" ; "")  *  "100"

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