The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have three tables, and I want to identify which vendors from the Products table are also present in the Order Ext. Details table. The goal is to create a measure that returns "Yes" when we can find a non-blank Shop value from the Order Ext. Details table. This will help us determine which vendors are assigned to shops and which are not.
I hope this explanation is clear. I attempted to use LOOKUPVALUE/RELATED, but I didn't get the expected results. Here's what I tried:
LOOKUPVALUE('Products'[Vendor], Products[Product_ID], LOOKUPVALUE('Bridge'[Product_ID], 'Bridge'[Market_ID], 'Orders Ext. Details'[Market_ID]))
Solved! Go to Solution.
Hello @asparagus1_ ,
There is a 1to*(single) relationships your data model. You can use two methos that are change relationship from single to both or use crossfilters function in your dax(it is best practice mostly). İf you choose first way you'll notice when you put vendor column(Products) to table and Shop column(Order Ext. Details). You'll see blank and non-blank shops and then you can filter to show non-blank values from filter pane. I hope it helps.
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |
Hi @asparagus1_ ,
Based on the information, try using the following DAX formula.
Vendor Has Shop =
VAR CurrentProduct = SELECTEDVALUE(Products[Product_ID])
VAR RelatedMarkets =
CALCULATETABLE(
VALUES(Bridge[Market_ID]),
Bridge[Product_ID] = CurrentProduct
)
VAR ShopFound =
CALCULATE(
SELECTEDVALUE('Orders Ext. Details'[Shop]),
FILTER(
'Orders Ext. Details',
'Orders Ext. Details'[Market_ID] IN RelatedMarkets &&
NOT(ISBLANK('Orders Ext. Details'[Shop]))
)
)
RETURN
IF( NOT ISBLANK(ShopFound), "Yes", "No" )
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @asparagus1_ ,
Based on the information, try using the following DAX formula.
Vendor Has Shop =
VAR CurrentProduct = SELECTEDVALUE(Products[Product_ID])
VAR RelatedMarkets =
CALCULATETABLE(
VALUES(Bridge[Market_ID]),
Bridge[Product_ID] = CurrentProduct
)
VAR ShopFound =
CALCULATE(
SELECTEDVALUE('Orders Ext. Details'[Shop]),
FILTER(
'Orders Ext. Details',
'Orders Ext. Details'[Market_ID] IN RelatedMarkets &&
NOT(ISBLANK('Orders Ext. Details'[Shop]))
)
)
RETURN
IF( NOT ISBLANK(ShopFound), "Yes", "No" )
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share some data to work with, explain the question and show the expected result. Share data in a format that can be pasted in an MS Excel file.
Hello @asparagus1_ ,
There is a 1to*(single) relationships your data model. You can use two methos that are change relationship from single to both or use crossfilters function in your dax(it is best practice mostly). İf you choose first way you'll notice when you put vendor column(Products) to table and Shop column(Order Ext. Details). You'll see blank and non-blank shops and then you can filter to show non-blank values from filter pane. I hope it helps.
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |
Thank you! This is what I was looking for.
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |