Question : FM Pro - Multiple Questions Open - 1 issue!!:  Best Way to Calculate and Filter

Just figured out that my 3 of my open questions all deal with the same issue:  What is the best way to calculate and filter at the same time.  Even though I posted sample db files, two of the questions are in the "request attention" phase as they've been open for two weeks.  However, the question is simple:  is there a way to save on hundreds of of summary count fields by creating a formula that does the same and includes a filter.  I've done this via Relationships, Portals, and a bunch of fields, but it seems like there must be an easier way.

Read my other three questions and whoever can answer it will receive 4/5 of the 500 points for each of these 4 open questions.

Answer : FM Pro - Multiple Questions Open - 1 issue!!:  Best Way to Calculate and Filter

Then let's keep this simple.

Is this an MS Access question or a FileMaker question?

Because I really don't know what a "summary count field" or a "Portal" is without any context.

In Access if you have a Table/query named: "Orders", and you want to sum up all the "Quantity" Fields of all the records that are (filtered on) a Country of "USA", then you would use something like this:

YourValue=Dsum("Quantity","Orders","Country=" & "'" & USA & "'")

If the Filter value is numeric (say the employee Number), then the syntax becomes:
YourValue=Dsum("Quantity","Orders","EmployeeID=" & 3)

There are various variations on this depending if these are hardcoded values or variables, but I am sure you get the idea.

In Access see the help files on DSum (aggregate functions)

;-)

JeffCoachman
Random Solutions  
 
programming4us programming4us