← 30 Days Power BI Series
Day 24 of 30IntermediateInterview Prep

Day 24: Power BI — Technical Interview Q&A Set 1

5 questions · Power BI Interview Preparation

Q1

What is the difference between a filter in a DAX measure and a visual-level filter?

A DAX measure filter (via CALCULATE) is embedded in the measure definition and always applies when that measure is evaluated — the report user cannot override it. A visual-level filter is set in the Filters pane and applies to one specific visual — the report developer sets it but it does not affect the underlying measure, only which rows of data the visual queries. Example: a measure defined as CALCULATE(SUM(Revenue), Region = "North") always shows North revenue regardless of any slicer. A visual-level filter for Region = "North" filters the visual but a different measure on the same visual responds to slicers normally.

💡 Interview tip: This distinction matters for report design decisions. Use DAX filters for always-fixed business logic. Use visual filters for developer-set defaults that could be changed later.
Q2

How do you handle a many-to-many relationship in Power BI?

Option 1 — Bridge table: create an intermediary table that has one row per combination of the two many-side keys. The bridge table has a 1:* relationship with each original table, converting the M:M into two 1:M relationships. Recommended approach. Option 2 — Bidirectional relationship: set the relationship to Both cross-filter direction. Power BI handles M:M with bidirectional filtering. Simpler but can cause ambiguous filter paths and unexpected results in complex models. Option 3 — Concatenated key: combine both keys into a single unique key in both tables if there is a meaningful composite key. Use a bridge table whenever possible — it is the most robust solution.

💡 Interview tip: Interviewers ask about M:M to test your data modelling depth. Mentioning the bridge table approach and the risks of bidirectional shows senior-level thinking.
Q3

What is USERELATIONSHIP in DAX and when do you need it?

USERELATIONSHIP(column1, column2) activates an inactive relationship for the duration of a CALCULATE expression. Power BI allows only one active relationship between two tables but you can have multiple inactive relationships. Example: a Sales table has both OrderDate and DeliveryDate. You create an active relationship on OrderDate to the Date table. You create an inactive relationship on DeliveryDate to the Date table. To calculate revenue by delivery date: Delivery Revenue = CALCULATE(SUM(Sales[Revenue]), USERELATIONSHIP(Sales[DeliveryDate], 'Date'[Date])). The inactive relationship activates only inside this measure.

💡 Interview tip: USERELATIONSHIP is commonly used when a fact table has multiple date columns (order date, delivery date, payment date) — each can have a relationship to the Date table, only one active at a time.
Q4

What is the difference between COUNTROWS and COUNT in DAX?

COUNTROWS(table) counts the number of rows in a table — the table can be filtered using CALCULATE or FILTER. COUNT(column) counts non-blank values in a specific column. COUNTA(column) counts non-blank values including text. COUNTBLANK(column) counts blank values. For most analyst use cases: COUNTROWS with CALCULATE is the preferred approach because it is more explicit — you are clearly counting rows of a specific filtered table. COUNT(column) can give misleading results if the column has nulls. DISTINCTCOUNT(column) counts unique non-blank values — use for counting unique customers, products, etc.

💡 Interview tip: COUNTROWS(FILTER(...)) and CALCULATE(COUNTROWS(...)) give the same result. CALCULATE version is faster. Know all COUNT variants and when each applies.
Q5

How do you pass a measure value into a DAX variable?

In DAX, variables (VAR) can store any expression result including measure evaluations: Profit Margin = VAR TotalRevenue = SUM(Sales[Revenue]) VAR TotalCost = SUM(Sales[Cost]) VAR Profit = TotalRevenue - TotalCost RETURN DIVIDE(Profit, TotalRevenue) Variables in DAX are evaluated once in the filter context at the point they are declared — not re-evaluated. This makes complex DAX measures both more readable and more efficient. VAR/RETURN is the modern DAX standard — use it in all measures with more than one calculation step.

💡 Interview tip: Always use VAR/RETURN for any measure longer than one line. It makes debugging easier (you can return any intermediate variable to check its value) and is more performant.
← Day 23All DaysDay 25

Want live Power BI coaching?

Join EVIKA Academy for hands-on Power BI training with real projects and placement support in Delhi NCR.

Book Free Demo →
Best Data Analytics Course in Noida Delhi NCR | EVIKA ACADEMY