TechNet
Export (0) Print
Expand All

LASTNONBLANK Function (DAX)

 

Returns the last value in the column, column, filtered by the current context, where the expression is not blank.

Syntax

LASTNONBLANK(<column>,<expression>)

Parameters

TermDefinition
columnA column expression.
expressionAn expression evaluated for blanks for each value of column.

Property Value/Return Value

A table containing a single column and single row with the computed last value.

Remarks

The column argument can be any of the following:

  • A reference to any column.

  • A table with a single column.

  • A Boolean expression that defines a single-column table

System_CAPS_ICON_note.jpg Note


Constraints on Boolean expressions are described in the topic, CALCULATE Function (DAX).

This function is typically used to return the last value of a column for which the expression is not blank. For example, you could get the last value for which there were sales of a product.

This DAX function is not supported for use in DirectQuery mode. For more information about limitations in DirectQuery models, see http://go.microsoft.com/fwlink/?LinkId=219172.

See Also

FIRSTNONBLANK Function (DAX)
Statistical Functions (DAX)
DAX Function Reference
Get Sample Data

Community Additions

Show:
© 2016 Microsoft