Skip to main content

What does FIRSTNONBLANKVALUE function do?

Table of Contents

The FIRSTNONBLANKVALUE function in Power BI/DAX returns the first non-blank value in the column that results from evaluating the expression. The expression can be any valid DAX expression and the column can be any column, (sorted values) from the current table, or a table referenced by a relationship in the current table.

The syntax of the FIRSTNONBLANKVALUE function is:

FIRSTNONBLANKVALUE(<column>, <expression>)

The first non-blank value of <expression>, as determined by the column sorted values.

where:

The FIRSTNONBLANKVALUE function returns a single value of any type, where the type of the returned value is the type of the expression.

How to use the FIRSTNONBLANKVALUE function in a new measure, for example:

This function returns the first non-blank value of the Date column, evaluated for each value of the Qty column.

This function is especially useful for finding the Opening Balance. Or the first value in a period.

In the same way, you can be asked about LASTNONBLANKVALUE

Add comment