Introduction
In this article, you will learn a very interesting category of DAX functions i.e. ‘Information Function’. In my previous articles, I have covered some other categories od DAX like ‘Date & Time Function’, ‘Time Intelligence Functions’, and ‘Logical functions’. As the name suggests, the information functions give us information in the term of ‘True’ or ‘False’.
DAX information functions look at the table, column, or row that is provided as an argument and informs you whether the value matches the expected type or not. For example, the ISERROR function returns TRUE if the value that you reference contains an error. There are many information functions used in Power BI. Let's have a look at them.
CONTAINS
Returns TRUE if there exists at least one row where all columns have specified values.
Syntax- CONTAINS(Table, ColumnName1, Value1, …)
Table- Any expression that returns a table.
ColumnName
Name of any column of the existing table, using DAX syntax. It cannot be an expression.
Value1
Any expression that returns a scalar value.
Ex
The below example tells us that the CreditCard table has a CardNumber 11112040199986 with a given ID 31.
CONTAINSROW
Returns TRUE if there exists at least one row where all columns have specified values.
Syntax- CONTAINSROW (Table, Value1, …)
Table- Any expression that returns a table
Value1- Any expression that returns a scalar value.
Ex.
CONTAINSSTRING
Returns TRUE if one text string contains another text string. CONTAINSSTRING is not case sensitive.
Syntax- CONTAINSSTRING(WithinTxt, FindTxt)
WithinText- The text in which you search the ‘FindText’
FindText- Text that you want to find.
Ex.
CONTAINSSTRINGEXACT
Returns TRUE if one text string contains another text string same as CONTAINSSTRING but the only difference between these two is ‘CONTAINSSTRINGEXACT’ is case-sensitive.
Syntax- CONTAINSSTRINGEXACT(WithinTxt, FindTxt)
WithinText- The text in which you search the ‘FindText’
FindText- Text that you want to find.
Ex.
ISBLANK
Checks whether a value is blank and return TRUE or FALSE.
Syntax- ISBLANK(Value)
Value- The value or expression that you want to test.
Ex.
ISCROSSFILTERED
Returns TRUE when the specified table or column is cross filtered.
Syntax- ISCROSSFILTERED(TableNameOrColumnName)
TableNameOrColumnName- Name of existing table or column, using DAX syntax
Ex.
ISEMPTY
Returns TRUE if the specified table or table-expression is empty.
Syntax- ISEMPTY(Table)
Table- A table or an expression that returns table.
Ex.
ISERROR
Check whether a value is an error and return TRUE or FALSE accordingly
Syntax- ISERROR(Value)
Value-The value you want to test.
Ex.
ISEVEN
Returns TRUE if the number is even, or FALSE if the number is odd.
Syntax- ISEVEN(Number)
Number- Any number to test. If the number is not an integer, then it will be truncated.
Ex.
ISFILTERED
Returns TRUE when there are direct filters on the specified column.
Syntax- ISFILTERED(TableNameOrColumnName)
TableNameOrColumnName- Any existing table or column.
Ex.
Summary
These are some DAX information functions. The rest of the functions I will explain in the next article. So, stay with us. Thanks for reading.