---
title: COUNTNOBLANK
description: COUNTNOBLANK
---

import { Aside, Steps } from '@astrojs/starlight/components';

# COUNTNOBLANK

The COUNTNOBLANK function calculates the number of non-blank or non-null cells or entries in a column. It counts the cells or entries that contain data.

## Applicable to

* Calculated Columns  
* Expressions

## Return Value

The return value of the COUNTNOBLANK function is an integer representing the count of non-blank or non-null cells or entries in the specified column.

## Remark

* COUNTNOBLANK is a valuable function for assessing data completeness and identifying the presence of data within a specific column.
* COUNTNOBLANK function returns the total count excluding nulls and blanks.
* COUNTNOBLANK function can be used across Dates, Strings, and Numbers.

## Syntax

```
COUNTNOBLANK(<expression>)
```

## COUNTNOBLANK 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>

## Parameters

| Expression | A placeholder in a function that is replaced with the actual widget and measure names. |
|---|---|
| Widget Name | The specific name or identifier of the widget being used for data visualization in the specific Infoboard. |
| Measure | Represents the name of the measure that is being displayed or analyzed using the widget. |

## Steps to Use COUNTNOBLANK

<Steps>
1. Write the COUNTNOBLANK function. For instance `COUNTNOBLANK<expression>`  
2. Replace `<expression>` with `'Widget Name'[Measure]`.Replace **Widget Name** with the actual name of your widget and **Measure** with the corresponding measure name.
3. Set the condition with the `COUNTNOBLANK` function based on the scenario. For instance, you can set the count of non-blank or not-null entries that meet a certain criterion, as the condition.
4. To learn how to configure an Expression in Infoveave, visit the section [Configure Expression]()./insights-v8/advanced-configuration/#configuring-expressions
</Steps>

**Scenario**
* Imagine you are managing a Consumption Dashboard, and one of your key objectives is to ensure the data within it is complete and accurate. Specifically, you want to count the number of non-blank entries in the '<strong>Customers</strong>' column of your dataset continuously. If this count ever reaches 20, you want to trigger a specific action on your dashboard to monitor and manage data completeness effectively.

**Scenario Details**
* **Dashboard Name** Offer Switch Dashboard
* **Widget Name** New Offer Switches
* **Measure Name** Customers (quantifying the number of customers)
* **Dimension Name** Discount Types (categorizing customers based on their payment behavior)
* **Dimension Value** "Big Sales" (representing customers who switched )

**Objective**

Your objective is to count the number of non-blank entries in the '<strong>Customers</strong>' column and determine if this count is equal to 20. If this condition is met, you want to trigger a particular action on your dashboard.
You can use the COUNTNOBLANK function as

```
COUNTNOBLANK('New Offer Switches'[Customers])=20
```

## COUNTNOBLANK in Calculated Columns

## Parameters

| Expression | A placeholder in a function that is replaced with the column names. |
|---|---|
| Column Name | The name of the column in the dataset or Datasource that contains the values you want to analyze. |

## Steps to use COUNTNOBLANK in Calculated Columns

<Steps>
1. Write the `COUNTNOBLANK` function. For instance `COUNTNOBLANK(<expression>)`
2. Replace `<expression>` with `[Column Name]` Replace **Column Name** with the actual name of your column required.
3. To learn how to add calculated columns in Infoveave, visit the section [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/).
</Steps>

<Aside title="Example">
**Objective** Consider that you have the below sales dataset, your goal is to count the number of non blank entries in the column "CATEGORY".

| 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 | 50.8155 | 8 |
| 2024-01-14 | Brazil | Snacks | 20.185 |  | 4 |
|  | Brazil | Cosmetics | 40.485 | 46.1529 | 2 |

You can use the COUNTNOBLANK function like

```
COUNTNOBLANK([CATEGORY])
```
The new calculated column will return the total number of rows in the dataset considering non blanks as **7**

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




