Forum Discussion
Relate two duplicate columns
Good morning
I have two identical columns related to different tables.
Example:
Employees
One employee table is related to different project tables and the other to time and HR tables.
When I want to get cross data between projects and hours I have to put both filters.
Would there be the possibility to relate these two tables or to create a filter in which if I select a value from one of them, the other is filtered without the filter appearing in the report?
Thank you.
4 Replies
- amitchandakSuper User
Syndicate_Admin , You can create a bridge table
distinct(union(distinct(location1[Employee_ID]),distinct(location2[Employee_ID])))
https://www.seerinteractive.com/blog/join-many-many-power-bi/
Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19
- Syndicate_AdminAdministrator
I have tried, but when I go to relate it, it only lets me do it with one of the original location1[Employee_ID], with the table location2[Employee_ID] it tells me that I can not establish any relationship because it conflicts with other tables.
Would there be the possibility to create a filter in the location1 table over the location2? A kind of FILTER but with a different column as a second argument.
For example:
FILTER ( location1, location2[Employee_ID] )
But the FILTER function does not allow me.
It would be a way for location2 to filter automatically when in location1 you filter for some value.
- amitchandakSuper User
Syndicate_Admin , make sure you have used distinct(side he union too), and if you have more than one fact then you need to remove bi-directional join
refer
Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19
- v-xiaotangCommunity Support
Have you solved this question with amitchandak's help? If you have solved the question, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.