Microsoft Certified Data Analyst Associate DAX Formulas and Functions 1 — Questions and Answers
Question 1: What does the CALCULATE function do in DAX?
- Performs arithmetic calculations on a column
- Evaluates an expression in a modified filter context (Correct answer)
- Counts rows that meet a condition
- Returns a value from a related table
Correct answer: Evaluates an expression in a modified filter context
CALCULATE evaluates a DAX expression while applying one or more filters to modify the current filter context.
Question 2: Which DAX function returns the sum of a column?
- SUMX
- SUM (Correct answer)
- TOTAL
- AGGREGATE
Correct answer: SUM
SUM takes a single column argument and returns the sum of all values in that column within the current filter context.
Question 3: What is the difference between ALL and ALLEXCEPT in DAX?
- ALL removes filters from all columns; ALLEXCEPT removes filters from all columns except specified ones (Correct answer)
- ALL includes all rows; ALLEXCEPT excludes specified rows
- They are identical functions
- ALL works on tables; ALLEXCEPT works on columns
Correct answer: ALL removes filters from all columns; ALLEXCEPT removes filters from all columns except specified ones
ALL removes all filters from a table or columns, while ALLEXCEPT removes filters from all columns except those listed.
Question 4: What does the RELATED function do in DAX?
- Creates a new relationship between tables
- Returns a value from a related table following the many-to-one relationship (Correct answer)
- Lists all related tables in the model
- Filters rows based on a related table's values
Correct answer: Returns a value from a related table following the many-to-one relationship
RELATED traverses a many-to-one relationship to retrieve a value from a column in a related table for the current row context.
Question 5: Which DAX function calculates year-to-date totals?
- DATEYTD
- TOTALYTD (Correct answer)
- SUMYTD
- YTDTOTAL
Correct answer: TOTALYTD
TOTALYTD evaluates an expression from the beginning of the year to the last date in the current filter context.
Question 6: What is the purpose of the DIVIDE function in DAX?
- To perform integer division only
- To safely divide two numbers and return an alternate result if the denominator is zero (Correct answer)
- To split a string column by a delimiter
- To divide a table into equal partitions
Correct answer: To safely divide two numbers and return an alternate result if the denominator is zero
DIVIDE safely handles division by zero by returning an optional alternate result (default blank) instead of an error.
What does the CALCULATE function do in DAX?