Skip to main content
Power BI

Power BI DAX Query View: Debugging Incorrect Plant-Level KPIs Before the Boardroom

A plant-level OEE or yield number looks wrong, and the usual debugging is to stare at the visual and guess. The DAX query view lets you interrogate the measure directly — isolate where the number goes wrong, before it reaches a leadership review.

Amit Kumar Singh - Technology Consulting Partner at MyData Insights

Technology Consulting Partner · MyData Insights

14+ years in industrial data · Former Accenture & EY · India, GCC, SEA

15 October 2026 · 9 min read

The bottom line

When a plant-level KPI — OEE, yield, scrap rate — looks wrong in a Power BI report, debugging by staring at the visual is guesswork, because a visual blends the measure, the filters and the model. The DAX query view lets you interrogate the measure directly: write a query that returns the raw number for a specific plant, shift, or line, and see the actual value without the visual’s layers. From there you decompose the calculation — evaluate the numerator and denominator separately, check what the filter context actually is, and test the measure at different grains — until you isolate where it goes wrong: a relationship, a filter that drops rows, a measure that does not respect the plant context. The point is to find the error in the query view, deterministically, before the wrong number reaches a leadership review and gets acted on.

Debugging a Visual Is Guessing

A plant manager flags that Line 3’s OEE on the dashboard looks too high, or the yield number does not match what the floor saw. The instinct is to open the report, look at the visual, and try to reason backwards about what might be wrong. That is guessing, because a visual is the end of a chain — the measure, the filters applied by slicers and the page, the relationships in the model — and you cannot see which link is faulty by looking at the output.

The result is the familiar debugging loop: change something, refresh, see if the number moved, repeat. It is slow and it is not deterministic — you might make the number look right without understanding why, which is worse than leaving it wrong.

The DAX query view changes this from guessing to interrogating. It lets you ask the model directly for the number, and then take the calculation apart until you can see exactly where it diverges from what it should be — before the figure reaches a review where someone acts on it.

Isolate the Measure in a Query

The first move is to get the number out of the visual and into a query. In the DAX query view, write a query that evaluates the suspect measure for the specific context in question — OEE for Line 3, last shift — and read the raw value directly. No visual, no page filters you cannot see; just the measure and the filters you explicitly set in the query.

This immediately separates two possibilities: is the measure itself returning the wrong number, or is the visual applying a filter you did not expect? If the query returns the correct value for Line 3 and the visual does not, the problem is in the report’s filter context, not the measure. If the query returns the same wrong value, the problem is in the measure or the model, and you keep digging there.

That split is most of the battle. A huge share of "the KPI is wrong" issues are actually filter-context issues — a slicer, a cross-filter, a page-level filter silently narrowing the data — and isolating the measure in a clean query tells you in one step whether you are chasing the measure or the report.

Get the number out of the visual and into a query. If the clean query is right but the visual is wrong, it is a filter-context problem — not the measure. That split is most of the battle.

Decompose the Calculation

If the measure itself is wrong, take it apart. A composite KPI like OEE is availability times performance times quality; yield is good units over total units. In the query view, evaluate each component separately — the numerator, the denominator, each factor — and compare against what each should be. The error is almost always in one specific part, and evaluating them in isolation finds it fast.

Define intermediate expressions in the query to expose the working: show the total units and the good units next to the yield, or availability and performance next to OEE, for the plant and shift in question. Seeing the parts makes the fault obvious in a way the single rolled-up number never does — a denominator that is too large because it is not filtered to the shift, a factor that double-counts.

This is the manufacturing version of testing against known answers: you know roughly what availability or good-unit count should be for that line and shift from the floor, so when the decomposed query shows a component that is clearly off, you have found the fault rather than guessed at it.

Check the Filter Context

Many plant-KPI errors come down to filter context — what rows the measure is actually evaluating over. A measure that looks correct can return the wrong number because the relationship between the production table and the line or shift dimension does not propagate the filter as expected, so "Line 3" does not actually narrow the data to Line 3.

In the query view you test this directly: evaluate the measure with an explicit filter to the plant, line and shift, and see whether the number responds correctly. If adding the filter in the query fixes it, the model’s relationships or the measure’s handling of context is the culprit — a relationship in the wrong direction, a measure that overrides context when it should respect it, a dimension not connected where the KPI assumes it is.

This is exactly the class of error that is invisible in a visual and obvious in a query. The visual shows a number; the query shows the number plus the ability to vary the context and watch how it responds, which is what reveals a measure that is not honouring the plant or shift it is supposed to.

Vary the plant, line and shift filter in the query and watch the number respond. A measure that does not change correctly when you narrow the context is not honouring it — invisible in a visual, obvious in a query.

So What — Found Before the Review

The DAX query view turns plant-KPI debugging from a guessing loop into a deterministic investigation: isolate the measure in a clean query to separate measure errors from filter-context errors, decompose a composite KPI into its parts to find which one is wrong, and vary the filter context to catch a measure that does not respect the plant or shift. Each step narrows the fault until you can see it, and fix it knowing why.

The reason this matters is timing. A plant-level KPI that is wrong and reaches a leadership review gets acted on — a line gets praised or blamed on a false number, a decision is made on a figure the floor already knew was off. Finding the error in the query view, before the review, is the difference between a quiet fix and a decision made on bad data. The same discipline that tests a model before deployment applies here when one slips through: interrogate the number directly, do not stare at the chart.

A wrong plant KPI that reaches a review gets acted on. Finding it in the query view beforehand is the difference between a quiet fix and a decision made on bad data.

If plant-level KPIs occasionally look wrong and debugging them is a guessing game, the DAX query view makes it deterministic. 30 minutes with Amit on isolating measures, decomposing KPIs and catching errors before the review. No slides, no pitch deck, no obligation to proceed.

Free Assessment

Where does your operation sit on the data maturity curve?

8 questions. 3 minutes. You get a scored breakdown across data infrastructure, analytics readiness, and automation potential — with a specific next step for your industry.

Power BIDAXManufacturingOEEData Quality

Your Data · Our Technology · Our Automation

Get practical insights every fortnight

Amit writes about Microsoft Fabric, Power BI, AI in operations, and digital transformation for manufacturing and supply chain leaders. Practitioner perspective - no fluff, no vendor spin.

No spam. Unsubscribe any time. Also on Substack.

FAQ

Common questions

How do you debug an incorrect KPI in Power BI?

Use the DAX query view rather than staring at the visual. Write a query that evaluates the suspect measure for the specific context — the plant, line and shift in question — and read the raw number directly. If the clean query is correct but the visual is wrong, it is a filter-context problem in the report; if the query is also wrong, decompose the measure into its parts (numerator, denominator, each factor) to find which component is off, and vary the filter context to catch a measure not respecting the plant or shift.

What is the DAX query view used for?

It lets you write and run DAX queries directly against the semantic model and read the raw numeric result, without the layers a visual adds. For debugging, that means isolating a measure to separate measure errors from filter-context errors, decomposing a composite KPI like OEE into availability, performance and quality to find the faulty part, and testing how the number responds as you change the filter context — a deterministic investigation instead of a guess-and-refresh loop.

Why does a plant KPI show the wrong number in Power BI?

Commonly a filter-context issue: a slicer, cross-filter or page filter narrows the data unexpectedly, or a relationship between the production table and the line/shift dimension does not propagate the filter, so "Line 3" does not actually restrict to Line 3. It can also be a measure error — a denominator not filtered to the shift, a factor that double-counts. Isolating the measure in a query and varying the context tells you which, where staring at the visual cannot.

How do you catch a wrong KPI before it reaches leadership?

Interrogate the number in the DAX query view as soon as it is questioned, rather than reasoning backwards from the chart. Decompose the calculation and vary the filter context until the fault is isolated and understood, then fix it knowing why. The point is that a plant-level KPI which is wrong and reaches a review gets acted on, so finding and fixing it deterministically beforehand is the difference between a quiet correction and a decision made on bad data.

Related FAQs

Questions operations leaders ask

Is this the challenge you’re facing?

Book 30 minutes with Amit. No sales motion, just a practitioner’s read on your data situation.