🚀 Power BI Interview Questions with Answers: Part 5
41. What is DAX?
DAX stands for Data Analysis Expressions. It is the formula language used in Power BI to create calculations and analyze data.
DAX is mainly used to create: Measures, Calculated Columns, Calculated Tables
Example: Total Sales = SUM(Sales[Sales Amount])
Why is DAX important?
DAX allows calculations that respond dynamically to: Slicers, Filters, Rows/columns in visuals, User selections
Same [Total Sales] measure can show company total, region total, or year total depending on filter context.
42. What is the difference between a Measure and a Calculated Column?
Measure: Calculated when used in a visual based on current filter context.
Example: Total Sales = SUM(Sales[Sales Amount]) → Calculates separately for each region in a visual.
Calculated Column: Calculated row by row when the model is refreshed.
Example: Profit = Sales[Sales Amount] - Sales[Cost] → Every row gets its own Profit value.
Key Difference: Measure = Dynamic calculation. Calculated Column = Stored row-level calculation
When to use Measure? KPIs, Aggregations, Percentages, Ratios, Time intelligence, Dynamic calculations
When to use Calculated Column? Categorization, Row-level flags, Columns used for grouping/relationships
43. What is a Calculated Table?
A new table created using DAX.
Example:
HighValueCustomers =
FILTER(
Customers,
Customers[Customer Segment] = "High Value"
)
When useful? Specialized modeling, Supporting tables, What-if scenarios, Intermediate structures
Note: Don't create unnecessarily if Power Query or source can do it better.
Distinction: Calculated Column = New column. Calculated Table = New table. Measure = Dynamic calculation
44. What is Row Context?
Row Context means DAX is evaluating an expression for the current row.
Found in: Calculated Columns, Iterator functions like SUMX(), AVERAGEX(), FILTER()
Example: Profit = Sales[Sales Amount] - Sales[Cost] → Evaluated for each row independently.
45. What is Filter Context?
The set of filters that determines which data is considered when a DAX measure is evaluated.
Comes from: Slicers, Visuals, Page/Report filters, Relationships, DAX expressions
Example: Total Sales = SUM(Sales[Sales Amount])
No filter = ₹10,00,000. Region = North selected = ₹2,50,000. Formula same, filter context changed.
Why important? Essential for understanding CALCULATE(), ALL(), REMOVEFILTERS(), Time intelligence, % of total
46. What is Context Transition?
Process where CALCULATE() converts an existing Row Context into Filter Context.
Example: In a calculated column, CALCULATE([Total Sales]) transforms current row into filters.
Remember: Row Context → CALCULATE() → Filter Context
47. What does CALCULATE() do?
Evaluates an expression after modifying the filter context.
Example:
North Sales =
CALCULATE(
[Total Sales],
Sales[Region] = "North"
)
Why important? Enables: Specific category sales, Excluding categories, PY sales, % of total, YTD, Inactive relationships
Interview Answer: "CALCULATE() evaluates an expression in a modified filter context. It allows us to add, remove, or modify filters."