Microsoft Certified Data Analyst Associate DAX Formulas and Functions 2 — Questions and Answers
Question 1: What does the FILTER function return in DAX?
- A single filtered value
- A filtered table based on a condition (Correct answer)
- A boolean TRUE/FALSE result
- The count of rows matching a condition
Correct answer: A filtered table based on a condition
FILTER returns a table containing only the rows that satisfy the specified Boolean expression.
Question 2: Which DAX function returns the number of rows in a table or the number of non-blank values in a column?
- COUNTA
- COUNTROWS (Correct answer)
- COUNT
- COUNTBLANK
Correct answer: COUNTROWS
COUNTROWS counts the number of rows in a table or in a table returned by an expression.
Question 3: What does the EARLIER function do in DAX?
- Returns the earlier of two dates
- References an outer row context within a nested row context iteration (Correct answer)
- Filters to earlier time periods
- Returns the first value in a sorted column
Correct answer: References an outer row context within a nested row context iteration
EARLIER accesses the value of a column from an outer row context when working in nested iterations, commonly used in calculated columns with FILTER.
Question 4: What is context transition in DAX?
- Switching between Import and DirectQuery modes
- The process where CALCULATE converts a row context into an equivalent filter context (Correct answer)
- Moving measures between tables
- Transitioning from one date period to another
Correct answer: The process where CALCULATE converts a row context into an equivalent filter context
Context transition occurs when CALCULATE converts the current row context into an equivalent filter context, which is critical to understand when using measures in calculated columns.
Question 5: Which DAX function returns a table with all combinations of values from multiple columns?
- UNION
- CROSSJOIN (Correct answer)
- INTERSECT
- CONCATENATE
Correct answer: CROSSJOIN
CROSSJOIN returns a table that is the Cartesian product of all specified tables, containing every combination of rows.
Question 6: What does the HASONEVALUE function return in DAX?
- TRUE if the specified column has exactly one value in the current filter context (Correct answer)
- The single value in a filtered column
- TRUE if a column has no blank values
- The count of distinct values in a column
Correct answer: TRUE if the specified column has exactly one value in the current filter context
HASONEVALUE returns TRUE when the filter context has reduced a column to exactly one distinct value, useful for conditional measure logic.
What does the FILTER function return in DAX?