Quiz: Advanced DAX & Time Intelligence (with explanation)

** Power BI for Healthcare: From Hospital Data to Actionable Dashboards
Lesson Content
0% Complete

Quiz / Skill Check

Q1. Which DAX pattern is typically used to build a running total measure?

Type: Multiple Choice

  1. SUM by itself, with no filter modification
  2. CALCULATE combined with a FILTER over dates less than or equal to the current date in context
  3. COUNTROWS with no arguments
  4. AVERAGE wrapped in RANKX

Correct Answer: CALCULATE combined with a FILTER over dates less than or equal to the current date in context

Why: A running total re-evaluates an aggregation (like SUM) across all dates up to and including the current one in context, which requires CALCULATE to modify the filter context with a condition such as ‘Date'[Date] <= MAX(‘Date'[Date]).

Q2. Using VAR and RETURN in a DAX measure changes the calculation result compared to writing the same logic without variables.

Type: True/False

Correct Answer: False

Why: VAR/RETURN doesn’t change what the measure calculates — it only makes the formula easier to read, debug, and reuse a value that would otherwise need to be repeated. The underlying logic and result are identical; variables are a readability and performance convenience, not a different calculation.

Q3. What does RANKX need, at minimum, to rank doctors by revenue?

Type: Short Answer

Correct Answer: A table (or table expression) to rank over and an expression to rank by, e.g. RANKX(<table>, <expression>) — often with an order (ASC/DESC) added.

Why: RANKX(table, expression, [value], [order], [ties]) evaluates the expression for every row of the given table, then returns where the current context’s value ranks among them. Without a table to compare against, there’s nothing to rank relative to.

Q4. What is one practical use of a time intelligence function like SAMEPERIODLASTYEAR in this hospital dataset?

Type: Multiple Choice

  1. Counting the total number of doctors
  2. Comparing this year’s revenue or appointment volume to the same period last year to spot trends
  3. Renaming a column
  4. Building a relationship between two tables

Correct Answer: Comparing this year’s revenue or appointment volume to the same period last year to spot trends

Why: Time intelligence functions shift the filter context to a different, comparable period (like the same months a year earlier), making it possible to build year-over-year or period-over-period comparisons — useful for spotting whether no-shows or revenue are trending up or down.

Course Outline