I have a table with a field that contains text data. 8 possible different values are saved in this field. How can I create a pie chart that displays the counting of the different values?
I usually just write a SQL statement returning an array of the 8 possible values and go to FileMaker Charts, select a Pie chart, and set the data to the global variable (e.g., $$Array).
Let ( [
SQL = "SELECT COUNT ( * ) FROM sometable WHERE some criteria GROUP BY your field used to group the 8" ;
Result = ExecuteSQL ( SQL ; ¶ ; ¶ )
$$Array = Result
Create a summary field with the option Count, and your primary key field.
Then you make a pie chart with your summary field as the data set.
Note that you must sort your records on the field that contains your text data, because you want to group and count the records with the same text value into each slice of the pie.
Retrieving data ...