COUNTNOBLANKX
The COUNTNOBLANKX function is used to count the number of rows within a specified table or dataset that meet a specific condition. It evaluates each row against the given condition and increments the count when the condition is true. This function is particularly useful for filtering and counting data based on specified criteria.
Return Value
- The return value of the COUNTNOBLANKX function is an integer representing the count of rows that satisfy the condition within the specified table or dataset.
Remark
- COUNTNOBLANKX is a useful function when you want to count rows based on specific criteria, such as filtering rows in a dataset that meet certain conditions or constraints.
Syntax
COUNTNOBLANKX(<expression>,<condition>)
COUNTNOBLANKX in Board Expression
Parameters
Expression | A placeholder in a function that is replaced with the actual widget and measure names. |
---|---|
Condition | A placeholder in a function that is replaced with the condition filter. |
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. |
Dimension | Represents the dimension column that is being displayed or analyzed using the widget. |
Dimension Value | Represents the specific dimension items within the dimension column used for the visualization in the widget. |
Steps to use COUNTNOBLANKX
- Write the COUNTNOBLANKX function. For instance
COUNTNOBLANKX(<expression>,<condition>)
- Where
expression
equals'Widget Name'[Measure]
andcondition
equals[Dimension Name]="Dimension Value"
.Replace Widget Name with the actual name of your widget, Measure with the required measure name, Dimension with the required dimension name and Dimension Value with the dimension value of the selected dimension name. - Set the COUNTNOBLANKX function based on the scenario.
- To learn how to configure an Expression in Infoveave, visit the section Configure Expression.
Example
Scenario You’re managing a dynamic dataset and an associated Infoboard named ‘Finance Analytics’ within your Financial Analytics System. Your mission is to count the number of rows where customers simultaneously qualify for two distinct discount categories- “Early Payment” and “No Discount.” This is a crucial activity for cost analysis and customer segmentation.
Scenario Details
- Dashboard Name Finance Analytics Dashboard
- Widget Name Finance Data Overview
- Measure Name Total Customers (representing the number of customers)
- Dimension Name Discount Types (categorizing customers based on their payment behavior)
- Dimension Values “Early Payment” (customers who pay their bills early) and “No Discount” (customers not eligible for any discount)
Objective Your objective is to count the number of rows where customers fall into specific discount categories, such as “Early Payment” and “No Discount,” 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 COUNTNOBLANKX function like this
COUNTNOBLANKX('Finance Data Overview'[Total Customers], [Discount Types] = "Early Payment" AND [Discount Types] ="No Discount") = 20
COUNTNOBLANKX in Calculated Columns
Parameters
Expression | A placeholder in a function that is replaced with the column name. |
---|---|
Condition | A placeholder in a function that is replaced with the condition filter. |
Column Name | The name of the column in the dataset or Datasource that contains the values you want to analyze. |
Filter Condition | A filter condition returns the data points that meet the defined condition that you want to analyze. The filter condition can be either a string or a numeric. |
Steps to use COUNTNOBLANKX in Calculated Columns
- Write the COUNTNOBLANKX function. For instance
COUNTNOBLANKX(<expression>,<condition>)
- Replace
<expression>
with required[Column Name]
and<condition>
equals[Column Name]="Filter Condition"
- Replace Column Name with the actual name of your column and Filter Condition with the required condition to be applied on the columns.
- To learn how to add calculated columns in Infoveave, visit the section Calculated Columns.
Example
Objective Consider that you have the below sales dataset, your goal is to identify the rows in the dataset where ORDER PRIORITY is Low and [DEALER]= Hirthe and Sons, then they should be eligible for a discount.
SHIP DATE | ORDER PRIORITY | DEALER | PACKET ID | SHIPPING QUANTITY | INVOICE PRICE | LOCATION |
---|---|---|---|---|---|---|
05-05-2024 | Low | Hirthe and Sons | 10048 | 3 | 28.65875 | KL |
10-05-2024 | Low | Hirthe and Sons | 10063 | 1 | 36.89025 | TN |
15-05-2024 | Medium | Sipes Group | 10069 | 3 | 28.65875 | TN |
20-05-2024 | High | Sipes Group | 10063 | 5 | 25.553 | KL |
25-05-2024 | High | Miller Inc | 10089 | 5 | 25.553 | TK |
- You can use the COUNTNOBLANKX function like
COUNTNOBLANKX([DEALER],[ORDER PRIORITY]="Low" AND [DEALER]="Hirthe and Sons")
The new calculated column will return the value as 2.
SHIP DATE | ORDER PRIORITY | DEALER | PACKET ID | SHIPPING QUANTITY | INVOICE PRICE | LOCATION | Eligible |
---|---|---|---|---|---|---|---|
05-05-2024 | Low | Hirthe and Sons | 10048 | 3 | 28.65875 | KL | 2 |
10-05-2024 | Low | Hirthe and Sons | 10063 | 1 | 36.89025 | TN | 2 |
15-05-2024 | Medium | Sipes Group | 10069 | 3 | 28.65875 | TN | 2 |
20-05-2024 | High | Sipes Group | 10063 | 5 | 25.553 | KL | 2 |
25-05-2024 | High | Miller Inc | 10089 | 5 | 25.553 | TK | 2 |