Forum Discussion
Bi-Directional filtering
- 1 year ago
Thankyou, Irwan, for your response.
Hi dwhittaker1,We thank you for your question in the Microsoft Fabric Community Forum.
As I understand, you are right to be careful about using bidirectional relationships. They can be useful but should be used carefully.
By default, Power BI relationships go from one side to many. So, filters from the QuoteLineItem table (many side) do not affect the QuoteHeader table unless you switch on bidirectional filtering.
For simple and medium sized models, it is okay to set the cross-filter direction to Both, especially if there are no circular relationships, the dataset is not very big, and you clearly understand how filters work. In these cases, using bidirectional filtering is an easy solution and works well.
If your model is large or complex, or if you want to avoid bidirectional filtering, you can use a disconnected dimension table and apply filters with TREATAS in a measure. But for your current case, this is not needed unless there is a performance problem.
Also, please check these links:
Model relationships in Power BI Desktop - Power BI | Microsoft Learn
Bi-directional relationship guidance - Power BI | Microsoft Learn
We hope this information helps you solve the issue. If you have more questions, please feel free to ask the Microsoft Fabric community.Thank you.
There's no need to make the relationship bi-directional. You can create a measure like
Quote Header is Visible =
IF (
SELECTEDVALUE ( 'QuoteHeader'[Quote ID] )
IN VALUES ( 'QuoteLineItem'[Quote ID] ),
1
)
and use that as a filter on the visual, set to show only when the value is 1.