Power BI Course · Error-repair lesson
PL-300 Mistakes: DAX Context and Model Design
Repair percent-of-total DAX, many-to-many confusion and bidirectional filter problems with checkable sample outputs.
Learn the design method, inspect a worked scenario, and test a fresh variation.
Core idea
A 100% result can be valid DAX and wrong analysis.
Wrong 35 / 35 = 100%
Fix denominator context
The direct answer
Fix the meaning of the number before formatting the visual.
PL-300 errors often come from a mismatch between the business question and the model or DAX context. A percent-of-total measure can show 100% for every region; a many-to-many relationship can create ambiguous totals; bidirectional filtering can make an unrelated slicer change results unexpectedly. The right repair begins with source rows and a clearly named result grain.
This page uses a three-row sales example to compare wrong and corrected DAX, then gives a model-design error map. It teaches error diagnosis rather than another general course overview. Pricing follows the introduction.
Course access
Choose your next step in Power BI.
Review the current course options and access details here.
Heycademy Courses · Coming Soon
Master Power BI with Heycademy
We’re preparing an interactive learning experience with practical exercises, skill assessments and personalized learning to help you build confidence and master new skills.
We’re putting the finishing touches on this course. Please check back for updates.
Small input
Two regions, three sale rows.
| Sale | Region | LineAmount |
|---|---|---|
| S1 | North | 20 |
| S2 | North | 15 |
| S3 | South | 30 |
The all-region total is 65. North contributes 35, and South contributes 30. The intended measure is each region’s share of all-region sales under the same other filters. Expected shares: North 35/65 ≈ 53.85%; South 30/65 ≈ 46.15%. Writing those expectations first gives a test oracle for the DAX.
Bad versus good DAX
The denominator must remove the Region filter.
-- Wrong for region share of all regions:
Region Share Wrong = DIVIDE([Sales Amount], [Sales Amount])
-- Under the stated model and filter scope:
Region Share =
DIVIDE([Sales Amount],
CALCULATE([Sales Amount], REMOVEFILTERS(Customer[Region])))| Visual row | Wrong same-context result | Expected region share |
|---|---|---|
| North | 35/35 = 100% | 35/65 ≈ 53.85% |
| South | 30/30 = 100% | 30/65 ≈ 46.15% |
The wrong formula evaluates both copies of [Sales Amount] under the same region filter. CALCULATE modifies filter context; REMOVEFILTERS(Customer[Region]) clears that column’s filter for the denominator. This is correct only for the stated denominator. If CustomerID filters should also be ignored, a different scope is needed. See Microsoft’s CALCULATE and REMOVEFILTERS references.
Many-to-many trap
A duplicated key changes the model assumption.
A Customer dimension should have one row per CustomerID. If C1 appears twice with different region labels, it is not a clean one-side dimension. A relationship or merge can produce surprising filter paths or duplicated rows. Do not cover the symptom by forcing DISTINCT around a value. Decide which customer row is valid, repair the dimension or model a legitimate bridge table for a genuine many-to-many relationship.
| Check | Good model | Problem signal |
|---|---|---|
| Customer key | C1 occurs once. | C1 repeated in supposed dimension. |
| Fact grain | One row per sale. | Order header repeated after item expansion. |
| Filter path | Region dimension reaches Sales clearly. | Bidirectional path changes unrelated table. |
Microsoft’s star-schema guidance explains dimension uniqueness and relationship design. Some many-to-many relationships are genuine, but they require an explicit model and validation of totals, not a default broad filter direction.
Keep building this skill
Turn the example into a checked report.
Return to the course options whenever you are ready.
Filter-direction trap
More propagation is not always more correct.
Changing every relationship to bidirectional can appear to make slicers “work” while creating ambiguous or unintended cross-filtering. Begin with a clear star schema and single-direction filters from dimensions to facts. Add a different direction only for a justified scenario and test the effect on representative visuals.
For the original data, select North and confirm the fact rows are S1 and S2. Add an unrelated dimension with no intended path; its slicer should not silently alter sales. If it does, inspect active and bidirectional relationships. Microsoft’s relationship guide documents filter propagation and active paths.
Original error map
Match the symptom to the first check.
| Symptom | Likely cause | Repair test |
|---|---|---|
| 100% on every region | Numerator and denominator share Region filter. | Compute 35/65 and 30/65 by hand. |
| Total too high | Fact duplicated by join or model grain. | Count source and model rows. |
| Slicer has no effect | Inactive or missing relationship. | Trace active path from dimension to fact. |
| Unrelated slicer changes result | Unintended bidirectional/ambiguous path. | Remove/change one relationship and compare. |
| Blank category | Unmatched key or missing dimension value. | Inspect source and relationship integrity. |
Repair one layer at a time. Changing DAX and relationships together makes it hard to identify the cause. Keep a before-and-after screenshot or output table plus the source rows that justify the new value.
Unseen check
Add a sale and recalculate the share.
Add a South sale of 40. The new total is 105, North remains 35 and South becomes 70. Correct shares are 33.33% and 66.67%. A measure showing 100% in both rows still has the same-context denominator mistake.
Show the explanation
The extra South row changes the denominator for both regions. Removing only Region from the denominator gives 105 in each row while the numerators remain region-filtered. Verify that any other report filter, such as month, is meant to remain.
The DAX and modeling lesson teaches the full context method.
A four-state test sheet
A measure needs more than one correct cell.
| State | Expected numerator | Expected denominator | Expected share |
|---|---|---|---|
| No Region filter | 65 | 65 | 100% total. |
| North | 35 | 65 | 53.85%. |
| South | 30 | 65 | 46.15%. |
| February + North | 15 | 45 | 33.33%. |
Write these values before changing the DAX. The total row is expected to be 100% for a share-of-total measure; the error is when each individual region also shows 100%. The February row confirms that a date filter remains while Region is removed from the denominator. A formula can appear fixed on North and still fail under a date slicer.
Also test an empty region. Decide whether the desired display is blank or zero and document the choice; DIVIDE can handle a zero denominator with an alternate result if the metric requires one. Do not treat a formatted percentage as evidence that the model’s underlying rows are correct.
FAQ
Questions about this skill.
Why does every region show 100%?
The numerator and denominator may be evaluated under the same region filter.
Should I use bidirectional filtering everywhere?
No. Use it only for a justified model requirement and test the resulting paths.
Does DISTINCT fix duplicated fact totals?
Not necessarily. Repair the entity grain and relationship or transformation causing the duplication.
Continue with the course
Build reliable Power BI skills.
Review the course options and choose your next learning step.