PRODUCTX DAX Function in Power BI
The PRODUCTX is a DAX function in Power BI that calculates the product of an expression evaluated row by row in a specified table.
DAX Syntax PRODUCTX(table, expression)
The function has the following parameters:
- table: The table containing the rows for which the expression will be evaluated.
- expression: The expression to be evaluated for each row of the table.
How the function works: Step 1: Iterates row by row over a given table.
Step 2: Evaluates the <expression> for each row.
Step 3: Multiplies all values returned by the expression.
Example: Let’s create a calculated column.
DAX
PRODUCTX Column = PRODUCTX ( Query38, IF ( Query38[Company] = "TCS", Query38[CustomerID] * 2, Query38[CustomerID] ) )
The output of the above code is shown below:

Here the values are calculated in such a way that:
• For each row in Query38, the formula checks if the value in the Company column is "TCS".
• If true, it multiplies CustomerID by 2.
• If false, it keeps CustomerID as it is.
Let’s see the evaluated result:
CustomerID | Name | Company | Evaluation (Expression Result) |
---|---|---|---|
1 | Ashish | TCS | 1 * 2 = 2 |
2 | Katrina | Microsoft | 2 |
3 | Alia | 3 | |
4 | Vicky | Accenture | 4 |
5 | Mohini | Infosys | 5 |
6 | Meenakshi | TCS | 6 * 2 = 12 |
7 | Esha | TCS | 7 * 2 = 14 |
8 | Anjali | 8 |
Now, PRODUCTX will multiply all these evaluated values:
2 * 2 * 3 * 4 * 5 * 12 * 14 * 8 = 322560