In the DAX query example, which function computes the median of Sales across the current filters?

Prepare for the DP-600 Fabric Analytics Engineer Exam. Study with flashcards and multiple choice questions, each offering hints and detailed explanations. Enhance your chances of success on the exam!

Multiple Choice

In the DAX query example, which function computes the median of Sales across the current filters?

Explanation:
To get the median of a calculated value across the current filter context in DAX, you use an iterator function that computes a value for each row and then takes the median of those values. MEDIANX does exactly that: it iterates over a table you specify, evaluates an expression for each row (for example, the Sales measure) within the current filters, and returns the median of all those results. This is necessary when the quantity you want to median is a calculated value rather than a simple column of numbers. Using a straight MEDIAN would require a single column of numbers to exist in the current context, which isn’t the case when Sales is a measure or depends on the row context you’re iterating over. AVERAGE would yield the mean, not the median, and SUMX would sum values rather than compute the median. So MEDIANX is the correct choice for computing the median of Sales across the current filters.

To get the median of a calculated value across the current filter context in DAX, you use an iterator function that computes a value for each row and then takes the median of those values. MEDIANX does exactly that: it iterates over a table you specify, evaluates an expression for each row (for example, the Sales measure) within the current filters, and returns the median of all those results. This is necessary when the quantity you want to median is a calculated value rather than a simple column of numbers.

Using a straight MEDIAN would require a single column of numbers to exist in the current context, which isn’t the case when Sales is a measure or depends on the row context you’re iterating over. AVERAGE would yield the mean, not the median, and SUMX would sum values rather than compute the median. So MEDIANX is the correct choice for computing the median of Sales across the current filters.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy