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

How do I calculate the percentage of a same number in a field to the total record count?


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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

  • Like 1

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