Forum Discussion
Matrix filter not working when using a single direction relationship
- 8 months ago
Hii Aliceeee
With single-direction relationships, filter flow only travels from the lookup (dimension) table to the fact tables, not between fact tables. In your model, the slicer is coming from the Advanced table, so its filter cannot propagate through the FullNames lookup to the Availability Sheet. When you switch to bidirectional, Power BI allows that fact-to-fact filter flow, which is why it works. To keep single direction (best practice), create the slicer from the FullNames lookup table or use a measure with TREATAS() to explicitly pass the filter from Advanced to Availability.
Hi Aliceeee,
Why the slicer does not work with single-direction relationships
However, when you apply a slicer based on a field from the Advanced table, the filter context does not propagate back to the lookup table because the relationship is one-way. As a result, the matrix (which uses Availability Sheet) does not receive the filter.
Why bidirectional works
- From Advanced ā FullNames ā Availability Sheet. This is why the slicer starts working immediately.
Do you really need bidirectional?
- Increase complexity.
- Cause ambiguous filter paths.
- Impact performance on large models.
Alternative approaches without bidirectional
- Use a measure with TREATAS
Instead of relying on bidirectional relationships, you can create a measure that applies the filter explicitly:
Filtered Measure =
CALCULATE(
[Your Existing Measure],
TREATAS(
VALUES('Advanced'[Full Name]),
'Availability Sheet'[Full Name]
)
)
- Consider a proper star schema
If both Availability Sheet and Advanced share the same dimension (FullNames), the slicer should ideally come from the lookup table, not from the fact tables.- Place the slicer on FullNames[Full Name].
- Ensure both fact tables have single-direction relationships to FullNames.
If this response was helpful in any way, Iād gladly accept a šmuch like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop š.