← Back to Modules 🏠 Back to Home
Created by Gagan Sir
Module 08: Debugging, Assignments, Glossary & 50+ Interview Q&A Bank
Power BI Desktop + Power Query + Data Modeling + DAX Formulas + Time Intelligence + Visual Selection + 50+ Interview Q&A
22
Common DAX Errors & Troubleshooting Table
Problem / ErrorPossible CauseFix / Solution
Single value cannot be determinedPassing a column to measure without aggregationWrap column in SUM(), MAX(), or SELECTEDVALUE()
Incorrect totals in visualMeasure ignoring table grain or filter contextUse SUMX() or adjust CALCULATE filter modifiers
Blank resultDate table disconnect or missing filter matchCheck relationships & date table coverage
Divide by zero errorStandard division `/` by 0Use `DIVIDE(num, denom, 0)`
Month names out of orderAlphabetical sorting defaultSort Month Name column by Month Number
Percentage 100x too highMultiplied formula by 100 while applying % formatRemove `* 100` from formula
Previous year blankMissing prior year dates in Date tableExpand CALENDAR date range
Circular dependencyCalculated columns referencing each otherRefactor to measures or review model design
23
12 Practice Assignments with Hints & Formulas
No.Task / AssignmentHint / Formula
1Total salesSUM(Sales[Sales])
2Total costSUM(Sales[Cost])
3Total profit[Total Sales] - [Total Cost]
4Profit marginDIVIDE([Total Profit], [Total Sales], 0)
5Label sales >= 50000 as HighIF(Sales[Sales] >= 50000, "High", "Low")
6Mohali salesCALCULATE([Total Sales], Sales[City] = "Mohali")
7Unique cities countDISTINCTCOUNT(Sales[City])
8Count total rowsCOUNTROWS(Sales)
9Sum sales > 10000 rowsCALCULATE([Total Sales], FILTER(Sales, Sales[Sales] > 10000))
10Top 5 productsRANKX or visual Top N filter
11Previous month salesPREVIOUSMONTH + CALCULATE
12Running totalCALCULATE + FILTER + ALLSELECTED
24
50+ Power BI & DAX Master Interview Q&A
❓ Core Concept Interview Q&A
  • Q: What is the difference between Power Query and DAX? Power Query is an ETL tool used for data cleaning and transformation before loading into the model; DAX is a calculation engine used for dynamic reporting, measures, and business analytics.
  • Q: Difference between Calculated Column and Measure? A column calculates values row-by-row at refresh time and stores them in RAM; a measure calculates on-the-fly inside the active visual filter context.
  • Q: How does CALCULATE work? `CALCULATE` evaluates an expression in a modified filter context by adding, removing, or updating active table filters.
  • Q: What is Context Transition? Context Transition occurs when `CALCULATE()` is invoked inside a row context (like SUMX or a Calculated Column), converting the current row into an equivalent filter context.