Quiz / Skill Check
Q1. Which DAX function safely handles division so that filtering to zero rows doesn’t produce a “divide by zero” error?
Type: Multiple Choice
- DIVIDE
- CALCULATE
- SUM
- AVERAGE
Correct Answer: DIVIDE
Why: DIVIDE(numerator, denominator, [alternate result]) automatically returns blank (or a specified alternate value) instead of erroring when the denominator is zero — safer than the plain “/” operator.
Q2. A calculated column is recalculated for every row and stored in the table, while a measure is calculated on the fly based on the current filter context of a visual.
Type: True/False
Correct Answer: True
Why: Calculated columns compute a value per row at data-refresh time and take up storage; measures are calculated dynamically whenever they’re used in a visual, always reflecting whatever filters (slicers, rows, columns) are currently applied.
Q3. Write the DAX formula for a measure that returns the total sum of the amount column in the billing table.
Type: Short Answer
Correct Answer: Total Revenue = SUM(billing[amount])
Why: SUM() aggregates a numeric column across all rows in the current filter context; wrapping it in a named measure makes it reusable across any visual.
Q4. What does CALCULATE do that a plain aggregation like SUM or COUNTROWS cannot do on its own?
Type: Multiple Choice
- It formats numbers as currency
- It changes the filter context that an expression is evaluated in (e.g., restricting rows to only “No-show” appointments)
- It creates a new table
- It renames a column
Correct Answer: It changes the filter context that an expression is evaluated in (e.g., restricting rows to only “No-show” appointments)
Why: CALCULATE lets you override or add filters to the context before evaluating an expression. CALCULATE(COUNTROWS(appointments), appointments[status]=”No-show”) counts only no-show rows regardless of what’s shown in the surrounding visual; a plain COUNTROWS(appointments) would just count whatever rows are already in context.