Data Analytics

Power BI - DAX and Advanced Dashboards

DAX (measures, calculated columns, CALCULATE, FILTER, ALL), drill-down, bookmarks, publishing

20 interview questionsยท
Senior
1

What is the fundamental difference between a measure and a calculated column in DAX?

Answer

A measure is calculated dynamically with each user interaction (filter, slicer) in the current visualization context, while a calculated column is evaluated once during data load and stored in memory within the table. Measures are optimal for aggregations and KPIs that change based on context, calculated columns for fixed attributes requiring sorting or grouping.

2

What is the main role of the CALCULATE function in DAX?

Answer

CALCULATE is the most powerful DAX function as it allows modifying the filter context in which an expression is evaluated. It takes an expression as its first argument, followed by one or more filters that replace or modify the current context. This enables creating measures that ignore certain filters or add new ones, regardless of slicers applied by the user.

3

Which DAX function should be used to remove all filters from a table or column in a measure?

Answer

The ALL function removes all filters applied to a specified table or column, allowing to get the grand total regardless of active slicers. It is often used with CALCULATE to compute percentages of total or comparisons with the entire dataset. ALLEXCEPT is a variant that removes all filters except those from specific columns.

4

How to calculate the percentage contribution of a category relative to the grand total in DAX?

5

What is the difference between ALL and ALLEXCEPT in DAX?

+17 interview questions

Master Data Analytics for your next interview

Access all questions, flashcards, technical tests, code review exercises and interview simulators.

Start for free