ProductX DAX Function in Power BI

In DAX (Data Analysis Expressions), the PRODUCTX function multiplies all the values of a given expression evaluated over a table.

  • Think of it like SUMX, but instead of summing, it multiplies.
  • The product here means the result of multiplying values together.

Syntax of PRODUCTX:

PRODUCTX(table, expression)

table: The table to iterate over.

expression: The expression to evaluate and multiply across each row.


🎯 Use Case: Calculating Compound Growth (Multiplicative Change)

Let’s say we have a table of annual growth rates for a product category over 4 years. We want to compute the total compound growth factor.


📊 Sample Table: GrowthRates

YearGrowthRate
20211.10
20221.05
20230.95
20241.08
  • The values in GrowthRate are growth multipliers:
    • 1.10 = 10% growth
    • 0.95 = 5% decline, etc.

Objective:

Find the compound growth factor over the 4 years.


🧮 DAX Measure:

CompoundGrowthFactor :=
PRODUCTX(
    GrowthRates,
    GrowthRates[GrowthRate]
)

🧾 Result:

1.10 × 1.05 × 0.95 × 1.08 = 1.18479 (approx)

This means that over 4 years, the value grew by ~18.5% cumulatively.


🧠 Why This is Relevant:

  • In finance, forecasting, and economics, growth is often multiplicative rather than additive.
  • You can’t just do SUM(GrowthRate) — it would be wrong. You need to multiply the yearly rates.