How to calculate product (multiply a set of numbers)?
I need to out put the PRODUCT of a set of number, but it seems this is not a standard function/calculation in FM. Any one can help me to achieve the calculation?
thanks in advance
Average (mean) can be calculated either with a summary field or the Average() aggregate function.
Depending on your data model, either List or ExecuteSQL could be used with the Evaluate function to compute the product of your data.
If you have this relationship:
where you want the product of a value in a field in Data for all records related to a given record in Parent,
Evaluate ( Substitute ( List ( Date::FactorField ) ; ¶ ; " * " ) )
will compute the product
In other situations where a simple relationship won't work, an SQL query inside ExecuteSQL() might be used:
Evaluate ( ExecuteSQL ( "SQL query goes here" ; "" ; " * " ) )
Is each number in a different field of the same record?
Is each number in the same field, but in different records?
In different repetitions of a repeating field?
All in a text field separated by some delimiting character such as a return?
The numbers are in multiple records in a different table which related to the overview table, all are in the same field (no repetition) in that table.
I like to calculate the average and the PRODUCT of those numbers
That is exactly the relationship.
PS, it worked beautifully. Thanks!
Retrieving data ...