---
title: PRODUCTX
description: Learn how to use the PRODUCTX function to calculate product values with conditional filters, perfect for advanced data analysis in calculated columns and dashboards.
---
import { Aside, Steps } from '@astrojs/starlight/components';

# PRODUCTX

The PRODUCTX function in Infoveave calculates the product (multiplication) of values in a dataset or column, considering a condition that filters which values are included.

## Applicable to

* Calculated Columns
* Expressions

## Return Value

* The product of all values in the dataset or column, based on the applied filter condition.

## Remark

* PRODUCTX is useful for calculating the product of values while applying a condition to selectively include or exclude values. It allows for more nuanced, conditional multiplication-based calculations.
* PRODUCTX neglects null and blank values.

## Syntax

```
PRODUCTX(<expression>,<condition>)
```

## PRODUCTX in Board Expression

<Aside>
Expressions help you add visual effects to your dashboard through widget-specific conditions. It is important to note that the Expressions are not meant to manage or modify data.
</Aside>

| Parameter       | Description                                                                                                    |
|-----------------|---------------------------------------------------------------------------------------------------------------|
| Expression      | A placeholder replaced with the actual widget and measure names.                                              |
| Condition       | A placeholder replaced with the condition filter.                                                             |
| Widget Name     | The specific name of the widget used for data visualization in the Infoboard.                                 |
| Measure         | The name of the measure displayed or analyzed using the widget.                                               |
| Dimension       | The dimension column displayed or analyzed using the widget.                                                  |
| Dimension Value | The specific dimension items within the dimension column used for visualization in the widget.                |

Steps to Use PRODUCTX

<Steps>
1. Write the PRODUCTX function. For instance `PRODUCTX(<expression>,<condition>)`
2. Where `expression` equals `'Widget Name'[Measure]` and `condition` equals `[Dimension Name]="Dimension Value"`. Replace **Widget Name**, **Measure**, **Dimension Name**, and **Dimension Value** with your actual values.
3. To learn how to configure an Expression in Infoveave, visit [Configure Expression](/insights-v8/advanced-configuration/#configuring-expressions).
</Steps>

<div role="alert">

**Scenario** You manage an Energy Offer Sales Dashboard and need to assess the impact of the product of offer quantity, considering specific payment behavior.

**Scenario Details**

* **Dashboard Name** Energy Offer Sales Dashboard
* **Widget Name** Quantity
* **Measure** Offers Sold
* **Dimension** Discount Types (categorizing customers based on payment behavior)
* **Dimension Value** "Pay on Time" (customers who pay on time)

**Objective** Use the PRODUCTX function to calculate the product of 'Solar Customers' in the 'Solar Feed In' dataset, exclusively involving customers with the "Pay on Time" payment type, ensuring the resulting product does not reach a critical threshold of 200.

```
PRODUCTX('Quantity'[Offers Sold], [Discount Type]="Pay On Time") < 200
```
</div>

## PRODUCTX in Calculated Columns

| Parameter       | Description                                                                                       |
|-----------------|---------------------------------------------------------------------------------------------------|
| Expression      | A placeholder replaced with column names.                                                         |
| Condition       | A placeholder replaced with the condition filter.                                                 |
| Column Name     | The name of the column containing the values you want to analyze.                                 |
| Filter Condition| A filter condition returns data points meeting the defined condition. Can be a string or numeric. |

Steps to Use PRODUCTX in Calculated Columns

<Steps>
1. Write the PRODUCTX function. For instance `PRODUCTX(<expression>,<condition>)`
2. Replace `<expression>` with the required `[Column Name]` and `<condition>` equals `[Column Name]="Filter Condition"`. Replace **Column Name** and **Filter Condition** with your actual values.
3. To learn how to add calculated columns in Infoveave, visit [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/) under Sources.
</Steps>

<Aside type="caution">
Do not use double quotes when setting up a numeric as the filter condition.
</Aside>

<div role="alert">

**Objective** Find the product of QUANTITY sold where COUNTRY is Japan.

| ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY |
|------------|---------|----------|------------|--------------|----------|
| 2024-01-03 | Brazil  | Baby Food| 38.41      | 43.7874      | 2        |
| 2024-01-07 | Japan   | Spices   | 45.56      | 50.8155      | 20       |
|            | Japan   |          |            | 43.7874      | 10       |
| 2024-01-18 |         |          |            | 32.3019      | 4        |
| 2024-01-22 | Brazil  | Cosmetics| 28.335     | 23.0109      | 7        |
| 2024-01-26 | Canada  |          | 20.185     | 23.0109      | 9        |
| 2024-01-04 | France  | Cereal   | 25.26      | 28.7964      | 9        |
| 2024-01-09 | Brazil  | Cereal   | 44.575     | 53.8155      | 8        |
| 2024-01-14 | Brazil  | Snacks   | 20.185     |              | 4        |
|            | Brazil  | Cosmetics| 40.485     | 46.1529      | 2        |

You can use the PRODUCTX function like

```
PRODUCTX([QUANTITY], [CATEGORY]="Japan")
```

The new calculated column "Unit Sold" will return 200 (considering nulls and blanks).

| ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY | UNIT SOLD |
|------------|---------|----------|------------|--------------|----------|-----------|
| 03-01-2024 | Brazil  | Baby Food| 38.41      | 43.7874      | 2        | 200       |
| 07-01-2024 | Japan   | Spices   | 45.56      | 50.8155      | 20       | 200       |
|            | Japan   |          |            | 43.7874      | 10       | 200       |
| 18-01-2024 |         |          |            | 32.3019      | 4        | 200       |
| 22-01-2024 | Brazil  | Cosmetics| 28.335     | 23.0109      | 7        | 200       |
| 26-01-2024 | Canada  |          | 20.185     | 23.0109      | 9        | 200       |
| 04-01-2024 | France  | Cereal   | 25.26      | 28.7964      | 9        | 200       |
| 09-01-2024 | Brazil  | Cereal   | 44.575     | 53.8155      | 8        | 200       |
| 14-01-2024 | Brazil  | Snacks   | 20.185     |              | 4        | 200       |
|            | Brazil  | Cosmetics| 40.485     | 46.1529      | 2        | 200       |
</div>

