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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
I have two tables for which I need to create a second relationship. Let me show you both tables:
Table 1:
Product code | Code of a similar product |
1234 | (blank) |
4567 | 8901 |
8901 | (blank) |
2345 | 1234 |
... | ... |
Table 2:
Product Code | Product spec 1 | Product spec 2 |
1234 | ... | ... |
4567 | ||
8901 | ||
2345 | ||
... |
I have an active 1-to-1 relationship between both Product Code columns. There are no duplicate values in the columns "product code" in both tables.
What I require is a second relationship between Table 1 "code of a similar product" to Table 2 "product code" to obtain the product specs and the rest of the information in my report.
The goal of this is to show which product codes correspond. There can be repetitive values in the column "code of a similar product", so logically I am thinking of a many-to-1 relationship between table 1 "code of a similar product" and table 2 "product code".
I hope this is clear, if not please let me know. I appreciate your help, thanks.
Solved! Go to Solution.
Hi @Anonymous ,
Pls test measure like the below:
test = LOOKUPVALUE('Master data'[Product Name],'Master data'[Product Code],MAX('Similar products'[Similar Product]))
Output result:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Any advice please?
Hi @v-luwang-msft ,
I got a follow-up question. I don't get my head around this because I cannot grasp why it won't work.
My USERELATIONSHIP function won't work when I want to use a measure (not a calculated column!).
What am I missing?
Please have a look here: https://we.tl/t-vpJWVJZ6Z2
Hi Lucien,
thanks, that worked.
Could you explain why the USERELATIONSHIP function won't work please?
Hi @Anonymous ,
see this article. the suggestion is to use lookupvalue instead.
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
The following screenshot shows essentially the same situation as your current one.
Best Regards
Lucien
I have many measures in the rest of my report, all of them relying on the data in table 2.
What would be the DAX expression to achieve my result?
My current one:
@Anonymous , Table 1 has blank. It would 1- Many from Table 2 to table 1 .
You have use userelationship in the measure
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.