
- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Logical - AND function
Description
Checks the two arguments if they are TRUE or FALSE, and returns TRUE only when both are TRUE. Otherwise, returns FALSE.
Syntax
AND (<logical1>, <logical2>)
Parameters
Parameter | Description |
---|---|
logical1 | Logical values that you want to test. | logical2 |
Return Value
- TRUE, if both the arguments are TRUE.
- FALSE, otherwise.
Remarks
AND function takes only two arguments. If you have more than two arguments, either nest the AND functions or use the DAX logical operator &&.
Example
= AND([Country] = "USA",[Medal] = "Gold")
This DAX formula returns a calculated column with TRUE for Country – USA and Medal – Gold values, and FALSE otherwise.
USA Gold Medal Count:= SUMX( Results,IF(AND([Country] = "USA",[Medal] = "Gold") = TRUE(),1,0) )
This DAX formula returns a calculated field with total number of Gold Medals for USA.
dax_functions_logical.htm
Advertisements