Hi Learners,
In this video, I have discussed about the scenarios where Filter Context is used with relationships in Power BI.
I have explained the working demo using measures. To know more, please watch this video.
Important point to consider are as below:
A filter context filters not only the current table or one table, but it propagates to the whole model using relationships and filters the whole model.
The filtering depends on the relationship between the two tables, which would decide whether the filtering would propagate or not.
A filter context makes use of relationship to propagate the filter in the direction allowed by the arrow. In case of one-to-many relationships, the filter propagates from the one-side to the many-side, whereas, in case of bidirectional relationships, the filter propagates on either side.
In contrast to using functions RELATED / RELATEDTABLE to propagate the row context from one table to another, a filter context propagates automatically without requiring any function. It follows the direction of the relationships to propagate the filter.
Note: It may sound that enabling bi-directional relationship is a good idea, but actually it can turn out dangerous for the model. They come with a lot of complexity. As a good practice, when required , bi-directional relationships should only be enabled using CROSSFILTER function in DAX.
To learn about CROSSFILTER function, please visit the link - • Bidirectional Cross Filtering in Powe...
To learn about nested row context, please visit the link - https://www.youtube.com/watch?v=GmgK4...
To learn the evaluation context from beginning, please visit the link - https://www.youtube.com/watch?v=Jf7hz...
To learn more about DAX and Power BI and to get the latest videos, please subscribe to our channel ML For Analytics.
/ mlforanalytics
To know more about our blog and the topics related to business intelligence and data science, please visit the following link:
https://mlforanalytics.com/