AnsweredAssumed Answered

database statistics page

Question asked by brian.brock on Aug 2, 2018
Latest reply on Aug 2, 2018 by jbrown

I am new to FileMaker Pro, so this may have an obvious answer that I'm just not seeing.

 

I would like to have a layout that gives some basic statistics regarding my database.

 

For example, there is a 'student' table that contains (among others) columns for last_name, first_name, and district_name.

 

There are 5,000+ records, and several different districts represented.

 

On the layout, I would like to have something along the lines of:

 

District Name# Records
% of Total
District A90018%
District B55011%
District C102520.5%

 

Perhaps there is a really simple way to do this? I was attempting to use ExecuteSQL, but am getting mixed results. Using Data Viewer I have the following:

 

     ExecuteSQL ( "SELECT COUNT(*) FROM Student where ST_District='District A' " ; "" ; "" )

 

This correctly gives me a result of 900.  However, when I copy and paste this exact code into a calculation field, then place it onto the layout, all I get is the question mark.

 

So, I suppose my question is actually two questions...

 

1) Why does the ExecuteSQL code work in Data Viewer, but not as an actual field and

2) Is there a better approach to creating the table as described above.

 

Thank you!

Brian Brock

Outcomes