Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to filter or set 3 tables relationships

Hello, 

I have 3 tables in my Power BI model, as shown in the screenshot below: Calendar, Main Records and Schedule tables. I already have the three tables connected via relationships as below via the Date field only (highlighted in blue) and it works fine when filtered by date, meaning that charts based on the Schedule and Main Records tables are updated together if the date selection is changed.

But the problem is that i also want to be able to filter by Student name (highlighted in red). The Attribute field in the Schedule table is the Student name and the list of names are the same in both Schedule and Main Records tables, so filtering by name in one table should also update the other table, but it doesn't work. I also tried to sync filters across all the charts as an alternative solution but it doesn't work either. I hope someone can help?

MakeItReal_0-1648061385568.png

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Create a new table (option under "Modeling" in the ribbon with:

Student table =
VAR sch = VALUES(Schedule[Attribute])

VAR main = VALUES(Main Records[Student])

RETURN

DISTINCT(UNION(main, sch))

 

Create your one-to-many relationships between this new table and the corresponding fields in both tables. 
now use the field from the Student table in slicers, visuals, filters, measures....





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

Create a new table (option under "Modeling" in the ribbon with:

Student table =
VAR sch = VALUES(Schedule[Attribute])

VAR main = VALUES(Main Records[Student])

RETURN

DISTINCT(UNION(main, sch))

 

Create your one-to-many relationships between this new table and the corresponding fields in both tables. 
now use the field from the Student table in slicers, visuals, filters, measures....





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.