- 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 Information - CONTAINS function
Description
Returns true if values for all referred columns exist, or are contained, in those columns. Otherwise, returns false.
Syntax
CONTAINS (<table>, <columnName>, <value>, [<columnName>, <value>] …)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
table Any DAX expression that returns a table of data. |
2 |
columnName The name of a column, in a table. It cannot be an expression. |
3 |
value Any DAX expression that returns a single scalar value. The expression is to be evaluated exactly once and before it is passed as a parameter. Value is what you find, if it exists or if contained in columnName. |
Return Value
TRUE or FALSE.
Remarks
The parameters columnName and value must come in pairs. Otherwise, the function returns an error.
columnName must belong to the specified table, or to a table that is related to table.
If columnName refers to a column in a related table, then it must be fully qualified. Otherwise, the function returns an error.
Example
= CONTAINS (Results, [Country],"IND", [Medal],"Gold")
This DAX formula returns TRUE, if there exists a Gold Medal for the Country India in the Results table. Otherwise, returns FALSE.
To Continue Learning Please Login
Login with Google