Thanks to visit codestin.com
Credit goes to www.tutorialspoint.com

LASTNONBLANK function



Description

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

Syntax

LASTNONBLANK (<column>, <expression>) 

Parameters

Sr.No. Parameter & Description
1

column

A column expression.

2

expression

An expression evaluated for blanks for each value of column.

Return Value

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

Remarks

The dates parameter can be any of the following −

  • A reference to a date/time column.

  • A table expression that returns a single column of date/time values.

  • A Boolean expression that defines a single-column table of date/time values.

Constraints on Boolean expressions −

  • The expression cannot reference a calculated field.

  • The expression cannot use CALCULATE function.

  • The expression cannot use any function that scans a table or returns a table, including aggregation functions.

However, a Boolean expression can use any function that looks up a single value, or that calculates a scalar value.

Example

= LASTNONBLANK (Sales [Sales Amount], MIN (Sales [Date])>3/31/2015) 
dax_functions_time_intelligence.htm
Advertisements