Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
How is it possible to have two tables and apply Or condition filter between these two tables. This means that i want to filter table A for some record OR at the same time table B to be filter based on something else. Since the tables are connected (i am very very simplifying the structure) to get the Cross Join of filtered A and filtered B
Hi @kyrpav ,
Has your problem been resolved? If so, could you please mark the helpful reply as Answered? This will assist others in the community who may encounter a similar issue. Thank you.
Otherwise, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @kyrpav - For RLS with OR conditions:
Go to the "Manage Roles" feature in Power BI Desktop.
Define roles using DAX expressions that include an OR condition
Eg :
[Column A] = "Condition A" ||
RELATED('Table B'[Column B]) = "Condition B"
Hope this helps
Proud to be a Super User! | |
Define Roles: Create a role in Power BI Desktop.
Use DAX for RLS: Write DAX expressions to define the filters for each table.
For example, let's say you have two tables, TableA and TableB, and you want to filter TableA based on Column1 and TableB based on Column2. You can use the following DAX expression:
[Column1] = "Value1" || RELATED(TableB[Column2]) = "Value2"
This expression filters TableA where Column1 equals "Value1" OR TableB where Column2 equals "Value2". The RELATED function is used to access columns from related tables.
Apply the Role: Assign the role to the relevant users.
Example
Assume TableA and TableB are related through a common key. Here's a more concrete example:
TableA has columns ID, Name, Column1
TableB has columns ID, Description, Column2
The relationship is based on the ID column. The DAX expression for the RLS role might look like this:
[Column1] = "Value1" || RELATED(TableB[Column2]) = "Value2"
This will ensure that the filter is applied to both tables with an OR condition.
Testing
After setting up the RLS, you can test it by using the "View as Role" feature in Power BI Desktop to ensure the filters are working as expected.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
User | Count |
---|---|
98 | |
76 | |
75 | |
49 | |
27 |