This is easy to do for one specific field - but if you want to summarize a different field each time, you will do well to change your structure, so that instead of 20-30 fields (IIUC) you would have 20-30 related records in a related table.
I think what you are suggesting would mean creating new databases, and since I have thousands of records in my old data bases, that doesn't sound like a practical solution.
Or have I misunderstood your suggestion?'
It would mean creating a new table in your existing file, and importing the factor data into it (you'd need to do this as a series of 20-30 imports, one factor field at a time).
It may sound like a drag, but consider the alternative, with only 3 factors:
You need to create a layout with 3 sub-summary parts (one for each factor field). In each part, you must place the corresponding factor field and a summary field, defined as Count of [any field that cannot be empty].
Now, to show the counts for factor A, you would go to this layout, find the records you want to summarize and sort them by factor A. To do the same thing for factor B, you need to sort by factor B, etc.
This can all be scripted, but it is still quite a lot of work - and it will solve only the issue of this specific report. The underlying structure problem will remain, and you might have to construct another monster when you want a different type of report.
I don't really understand everything you wrote, but I think I get the point.
Can you explain, in baby steps, how to make and use this table you are talking about? I know nothing about tables in Filemaker.
I can explain the structure that you should have (IMHO); how to migrate your existing data into it is another story:
• ClauseID (auto-entered serial number)
• Clause (the actual data)
• ValueID (auto-entered serial number)
• ClauseID (this is the link to the parent clause)
• Factor (i.e. the category of the value)
• sCount (summary field: Count of ValueID)
Optionally, you could have a third table listing the possible factors - or you can use a value list for this.
If the possible values for each category are very different, that may be a fourth table.
The two tables are related as:
Clauses::ClauseID = FactorValues::ClauseID
with creation of new records enabled on FactorValues side.
To enter data, you can use a portal into FactorValues on the layout of Clauses. For each new value, you select the factor and enter the value.
To summarize the data, you go to a layout of FactorValues, find the relevant category in the Factor field, and sort by Value.
Because your data is atomized, it can be grouped in any way - and producing reports from any point of view is very easy.