mistery Posted August 24, 2014 Posted August 24, 2014 I would like to find out something important for my project... I have 100 records and 44 of those records contain in a field called "division" the number '4" 33 of those records contain in the devision field the number "3" So to find out the percentage of those answers it would be respectively 44% and 33% I would get that by a calculation dividing the number of listing of that number by 100 How do I get a count of all the records that contain in the field division the number "4" ? I am stuck. Thanks
Ocean West Posted August 25, 2014 Posted August 25, 2014 You could use ExecuteSQL ( i haven't tested this so your mileage may vary ) SELECT AVG(column_name) FROM table_name WHERE column_name = "4" SELECT AVG(column_name) FROM table_name WHERE column_name = "3" or create a field in FMP and call it "IsThree" and it resolves to one when your division field is "3" / same with four then you can do your aggregated average on these fields.
Mountain Posted August 25, 2014 Posted August 25, 2014 So there is no direct Filemaker Function that will do this?
comment Posted August 25, 2014 Posted August 25, 2014 The native Filemaker way is to use a summary field sCount defined as Count of [Division]. Next, define a calculation field (result is Number) = GetSummary ( sCount ; Division ) / sCount Place the calculation field in a sub-summary (when sorted by Division) part. Records must be sorted by Division. Each sub-summary occurrence will display the percentage of the corresponding value in the found set. There are other ways to arrive at the same result - all depends on when/where/why you need this. 1
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