Using logical functions
Logical functions return a true or false answer that can be used in IF
statements.
Logical functions return Boolean values such as 1/0
, which is equal to true/false.
These functions are usually used to return a value that will be used inside a variable for filtering purposes or as indicators that we can use for sorting or display purposes.
For example, we can check whether the sales net gross measure contains a value or not and create a filter according to the result that the function will return.
The main logical functions are as follows:
IsDate
: This returns a Boolean value if the value is a dateIsNumber
: This returns a Boolean value if the value is a numberIsnull
: This returns a Boolean value if the value is null (this function works with all types of data: numeric, string, and date)IsString
: This returns a Boolean value if the value is a string
How to do it...
Perform the following steps:
We have a table with two measures, but don't have a value in each row. We want...