Newbies wdiaz102 Posted March 11, 2014 Newbies Posted March 11, 2014 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.
eos Posted March 11, 2014 Posted March 11, 2014 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 wdiaz102 Posted March 11, 2014 Author Newbies Posted March 11, 2014 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"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now