A dashboard tin look cleanable until 1 slicer changes and the “monthly sales” number abruptly stops making business sense. The quality is seldom the floor plan - it is whether the expert understood measures, calculated columns and information context.
- Measures are DAX calculations evaluated astatine query time, usually responding to slicers, filters and visuals.
- Calculated columns are DAX calculations evaluated statement by statement during refresh and stored successful the model.
- Filter context is the group of filters progressive erstwhile a measurement is evaluated - slicers, rows, columns, ocular filters and relationships.
- Row context intends DAX is evaluating 1 statement astatine a clip - communal successful calculated columns and iterator functions for illustration SUMX.
- Use measures for aggregations for illustration revenue, separator %, ARPU and growth; usage calculated columns for row-level labels for illustration property band, bid type aliases customer segment.
- CALCULATE is the powerfulness function: it evaluates an look aft modifying select context.
- The safest question and reply line: “If the consequence must alteration pinch slicers, make it a measure; if it is simply a row-level property needed for slicing, make it a calculated column.”
Big Picture: DAX Has Two Different Moments of Truth
In Power BI, the same-looking look tin behave otherwise depending connected when it runs and what context surrounds it. Calculated columns tally erstwhile information is loaded aliases refreshed; measures tally erstwhile a study ocular asks a question.
Core Explanation: The Three Ideas That Make DAX Click
1. Measures reply business questions dynamically
A measure is the correct prime erstwhile the calculation is an aggregation aliases KPI: full sales, gross separator %, mean bid value, customer count, marketplace stock aliases month-on-month growth.
Example DAX:
Total Sales = SUM(Sales[Amount])
Gross Margin % = DIVIDE([Gross Margin], [Total Sales])
The cardinal is that a measurement does not clasp 1 fixed value. If your ocular is filtered to Maharashtra, it calculates Maharashtra sales. If the slicer changes to Q4, it calculates Q4 sales. If some apply, it calculates income for Maharashtra successful Q4.
2. Calculated columns create row-level attributes
A calculated column is useful erstwhile each statement needs a stored worth that tin beryllium utilized for filtering, grouping, sorting aliases relationships.
Example DAX:
Order Size Band = IF(Sales[Amount] >= 5000, "Large", "Small")
This is evaluated for each statement during refresh. It becomes portion of the table, truthful it tin beryllium connected an axis, slicer aliases narration path. But it increases exemplary size and does not automatically recalculate based connected a user’s slicer choices.
3. Evaluation discourse is the hidden situation astir your formula
Evaluation context intends the filters and statement positions progressive erstwhile DAX calculates an expression. Most DAX disorder comes from forgetting that Power BI does not cipher successful quiet abstraction - it calculates wrong a discourse created by the exemplary and the visual.
Worked Example: Same Data, Different Context
Assume a Sales array has 4 rows:
Create these DAX calculations:
Gross Profit Column = Sales[Amount] - Sales[Cost]
Total Sales = SUM(Sales[Amount])
Gross Profit = SUM(Sales[Gross Profit Column])
Gross Margin % = DIVIDE([Gross Profit], [Total Sales])
The calculated file stores row-level gross profit: 40, 70, 60 and 10. Across each rows, full income = 500 and gross profit = 180, truthful gross separator % = 180 / 500 = 36%.
Now use a slicer for Region = North. The measurement recalculates only rows 1 and 2: full income = 300, gross profit = 110, truthful gross separator % = 110 / 300 = 36.7%. The calculated file values did not change; the measure consequence changed because select discourse changed.
Measures vs Calculated Columns: The Decision Table
The DAX Context Decision Matrix
If you retrieve only 1 exertion framework, usage this matrix. Ask 2 questions: “Is this row-level?” and “Should it alteration pinch slicers?”
Where CALCULATE Fits
CALCULATE is utilized erstwhile the normal select discourse is not enough. It evaluates an look aft adding, removing aliases replacing filters.
Example:
Sales Maharashtra = CALCULATE([Total Sales], Customer[State] = "Maharashtra")
If a ocular is filtered to FY2025 and the measurement supra adds Maharashtra, the consequence becomes: full income for FY2025 and Maharashtra. This is why CALCULATE is often the usability that separates basal Power BI users from beardown DAX users.
Definitions You Must Be Able to Say Cleanly
- Measure: A DAX look evaluated astatine query clip successful the existent select context.
- Calculated column: A DAX look evaluated statement by statement during refresh and stored successful the model.
- Row context: The existent statement disposable to a DAX expression, typically successful calculated columns aliases iterator functions.
- Filter context: Filters applied by visuals, slicers, relationships and DAX functions earlier evaluating a measure.
- CALCULATE: Microsoft defines it as: “Evaluates an look successful a modified select context.”
Case Study: Lenskart and the Omnichannel Reporting Trap
Lenskart scaled an omnichannel eyewear exemplary crossed stores, app, web and eye-test services; its reporting problem shows why DAX discourse matters.
Omnichannel businesses make the aforesaid KPI look different depending connected channel, metropolis and clip context.Lenskart is simply a useful Power BI lawsuit because the business is not a azygous online funnel. A customer whitethorn observe frames online, book an oculus test, sojourn a beingness store, usage an app connection and complete a acquisition done a different channel. That creates a classical analytics challenge: the activity squad wants 1 type of revenue, conversion and margin, but each squad slices the business differently.
The superior reporting move is to build a shared semantic model: truth tables for orders, visits and oculus tests; magnitude tables for date, city, store, merchandise and channel; and cardinal DAX measures for revenue, conversion and margin. Supporting drivers matter too: cleanable transmission definitions, accordant customer identifiers wherever permitted, observant narration creation and governance complete KPI names.
The lesson: omnichannel analytics fails erstwhile each squad creates its ain numbers. It improves erstwhile the exemplary separates business attributes from dynamic KPIs. Lenskart’s broader business spot comes chiefly from its integrated online-offline customer journey, supported by affordable assortment, eye-test access, supply-chain power and technology-led unit operations - not from 1 dashboard alone.
How AI Changes Power BI Measures, Calculated Columns and Evaluation Context
AI is changing Power BI activity successful 3 actual ways.
- Natural-language DAX drafting: Copilot-style assistants tin propose measures from prompts for illustration “calculate income for the aforesaid play past year.” This speeds up first drafts, but the expert must still validate select context, narration paths and separator cases.
- Semantic exemplary documentation: AI tin summarize measurement logic, observe copy KPI names and draught descriptions for a governed model. This matters because business users often spot dashboards much erstwhile each measurement has a clear definition.
- Performance troubleshooting: AI tin thief explicate slow DAX patterns, propose replacing calculated columns pinch measures, and place high-cardinality columns that whitethorn bloat the model.
Because AI tin make assured but incorrect DAX, way these value measures earlier utilizing AI-assisted calculations successful a business dashboard:
Student workflow: return a Power BI measurement list, export definitions into a document, and load it pinch the business problem into ChatGPT aliases Claude. Ask: “For each DAX measure, place the expected select context, imaginable ambiguity and 1 trial case.” Then manually trial the DAX successful Power BI utilizing slicers and Performance Analyzer. AI should accelerate your reappraisal - not switch your judgment.
Interview Relevance
“In Power BI, erstwhile would you usage a measurement alternatively of a calculated column? Explain information discourse pinch an example.”
Use the building “same formula, different select context, different answer”. It signals that you understand why Power BI numbers alteration crossed visuals.
Common Mistake
The biggest correction is saying “measures and calculated columns are some conscionable DAX formulas.” That sounds technically existent but interview-poor because it ignores timing, retention and context. Fix: ever comparison them connected information time, storage, slicer behaviour and business usage case.
What to Revise Next
Now that DAX discourse is clear, move from calculation logic to dashboard delivery. Revise really reports are built, published and shared, past comparison Power BI reasoning pinch Tableau’s calculated fields and view-level logic.
English (US) ·
Indonesian (ID) ·