In a DAX query executed via the XMLA endpoint, which function should you use to create a table with specific columns (for example Name and OpenDate) before applying a date filter?

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 a DAX query executed via the XMLA endpoint, which function should you use to create a table with specific columns (for example Name and OpenDate) before applying a date filter?

Explanation:
When shaping data in a DAX query, you need a table expression that contains only the columns you want to output. SUMMARIZE is the right tool for that because it creates a new table from the source table, including only the specified columns. By requesting Name and OpenDate, you get a table with just those fields, which is exactly what you need before applying any date-based filtering. After you’ve created that table, you can apply a date filter by constraining the OpenDate column—typically with FILTER or by wrapping the expression in CALCULATE/CALCULATETABLE to adjust the filter context. In an XMLA/DMX context, you’d return the result with EVALUATE, but EVALUATE alone doesn’t select columns or apply filters; it exposes the final table expression. So using SUMMARIZE to build the column-specific table before filtering is the correct approach. Example pattern: EVALUATE CALCULATETABLE(SUMMARIZE(Store, Store[Name], Store[OpenDate]), Store[OpenDate] >= _SALES_SINCE)

When shaping data in a DAX query, you need a table expression that contains only the columns you want to output. SUMMARIZE is the right tool for that because it creates a new table from the source table, including only the specified columns. By requesting Name and OpenDate, you get a table with just those fields, which is exactly what you need before applying any date-based filtering.

After you’ve created that table, you can apply a date filter by constraining the OpenDate column—typically with FILTER or by wrapping the expression in CALCULATE/CALCULATETABLE to adjust the filter context. In an XMLA/DMX context, you’d return the result with EVALUATE, but EVALUATE alone doesn’t select columns or apply filters; it exposes the final table expression. So using SUMMARIZE to build the column-specific table before filtering is the correct approach.

Example pattern: EVALUATE CALCULATETABLE(SUMMARIZE(Store, Store[Name], Store[OpenDate]), Store[OpenDate] >= _SALES_SINCE)

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy