ISBLANK is a DAX function that checks whether a value is blank and returns TRUE or FALSE accordingly.
Syntax
ISBLANK( Value )
Argument | Properties | Description |
---|---|---|
Value | The value you want to test. |
ISBLANK is a DAX function that checks whether a value is blank and returns TRUE or FALSE accordingly.
ISBLANK( Value )
Argument | Properties | Description |
---|---|---|
Value | The value you want to test. |
A Boolean value of TRUE
if the value is blank; otherwise FALSE
.
To learn more about best practices when working with BLANKS, see Avoid converting BLANKs to values in DAX.
This formula computes the increase or decrease ratio in sales compared to the previous year. The example uses the IF function to check the value for the previous year’s sales in order to avoid a divide by zero error.
//Sales to Previous Year Ratio
= IF( ISBLANK('CalculatedMeasures'[PreviousYearTotalSales])
, BLANK()
, ( 'CalculatedMeasures'[Total Sales]-'CalculatedMeasures'[PreviousYearTotalSales] )
/'CalculatedMeasures'[PreviousYearTotalSales])
Result,
Row Labels | Total Sales | Total Sales Previous Year | Sales to Previous Year Ratio |
---|---|---|---|
2005 | $10,209,985.08 | ||
2006 | $28,553,348.43 | $10,209,985.08 | 179.66% |
2007 | $39,248,847.52 | $28,553,348.43 | 37.46% |
2008 | $24,542,444.68 | $39,248,847.52 | -37.47% |
Grand Total | $102,554,625.71 |
Other functions related to ISBLANK are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy