DAX Text - BLANK function



Description

Returns a blank.

Syntax

BLANK () 

Parameters

BLANK function has no parameters.

Return Value

A blank.

Remarks

  • Blanks are not equivalent to nulls.

  • DAX uses blanks for both database nulls and for blank cells in Excel.

  • Some DAX functions treat blank cells somewhat differently from Microsoft Excel.

  • Blanks and empty strings ("") are not always equivalent, but some operations may treat them as such.

Example

= IF ([No. of Units] = 0, BLANK (), [Sales Amount]/ [No. of Units]) 

This DAX formula returns

  • The Unit Price for each Sales Transaction, when No. of Units > 0

  • BLANK, when No. of Units = 0

Avoids ‘Divide by zero’ error.

dax_functions_text.htm
Advertisements