Forum Discussion
Power BI: Model is not working as expected
- 3 months ago
Hello Taher28,
Hope you are doing well!
FactBudget only has Level3Key. When the matrix drills to Level 4, the filter context carries a Level4Key that has no path to FactBudget → Budget repeats or goes blank.
Correct Schema (3 tables):
DimHierarchy (L4 grain, has Level3Key column)
│
├──► FactActuals (join on HierarchyKey)
│
└──► DimHierarchyL3 (join on Level3Key, Many:1)
│
└──► FactBudget (join on Level3Key, Many:1)
All relationships single direction. No bi-directional filters.
The one critical DAX fix:
Budget 2026 =
VAR _L3Keys = VALUES( DimHierarchy[Level3Key] )
RETURN
CALCULATE(
SUM( FactBudget[BudgetAmount] ),
TREATAS( _L3Keys, DimHierarchyL3[Level3Key] )
)
TREATAS re-anchors the filter context from L4 → L3 explicitly, bypassing relationship ambiguity.
Here's some rules :
✅Separate L3 bridge dimension ❌Single flat fact with NULLs
✅TREATAS to map grain ❌RELATED() inside measure
✅Single-direction relationships ❌Bi-directional on any fact
To sum up : Schema + TREATAS = problem solved.
Hope this helps! Don't forget to mark as solution and thumbs up, that's motivate me to keep helping 🙂
Best regards,
Oussama (Data Consultant - Expert Fabric & Power BI)
Hello Taher28,
We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.
Thank you.