The PRODUCTX function returns the product of the values taken by an expression that is evaluated for all rows in a table.
PRODUCTX(
table,
expression
)
- table: Table containing the rows for which the expression will be evaluated. It can be the name of an existing table or an expression that returns a table.
- expression: Expression to evaluate for each row of the table.
The PRODUCTX function returns a real number.
The function only considers numbers, ignoring Blanks, logical values and text strings.
If we start from the following data table:
...we can calculate the product of the values resulting from evaluating the expression Qty * Pct for each row with the following measure:
Result = PRODUCTX(Data, Data[Qty] * Data[Pct])
Taking it to a card-type display we obtain the following result:
...value resulting from multiplying the partial results in each row, results that we can show in a calculated column if we want to confirm the final result:
Indeed, the product of the values 2.4, 2.4, 3.2, 4.5 and 3.2 returns the value 265.4208.