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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ehab-H
Frequent Visitor

Lookup data between three tables

Hi folks

After multiple attempts - I finally decided to post here for some help. 

We have orders that can either be generated against the customer or the contact. 

In our report, we have three related tables, but I can't show data from the two-child table at the same time without switching the relationship. I did have the cross filter setup as "Both" as well.

 

  • Table 1 -  Order
    • Object ID ( A unique ID that can either exist on table 2 or table 3)
  • Table 2 - Contact:
    • Contact ID: Which may equal Object ID from Table 1
    • Parent Customer ID: A unique ID from table 3
  • Table 3 - Customer:
    • Customer ID: Which may equal Object ID from Table 1

 

The relationship I have is set up as follow:

  • Contact and customer are related by "Parent Customer ID."
  • Order - I can only enable one side - so I mapped to contact directly, thinking it will look up the customer if no matching ID is found.
  • I would like to have it show data from either Contact or Customer.

 

In summary, we need the lookup to show data if ID matches the Contact ID or Customer ID - both IDs are unique. 

What's the best approach to accomplish this pass-through or lookup relationship.

 

I really appreciate any help you can provide.

Ehab

4 REPLIES 4
Ehab-H
Frequent Visitor

Thanks, @Jihwan_Kim and @Anonymous 

I've been trying to post my reply which contains a table I created here in the editor but keep getting (Invalid HTML).

I will see what the issue is and reply back.

Anonymous
Not applicable

Hi @Ehab-H ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.

 

Best Regards,

Yuna

Anonymous
Not applicable

Hi @Ehab-H ,

 

Based on your description, I think maybe I'm getting what actually you are trying to do. 

Could you please share some sample data and the expected result to have a clear understanding of your question? I can do some tests for you.

You can save your files in some cloud sharing platforms and share the link here.

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,

Yuna

Jihwan_Kim
Super User
Super User

Hi, @Ehab-H 

Please correct me if I wrongly understood your question.

I am not sure how your fact table looks like, but if I may suggest, I like to suggest the below structure. The sample pbix file's link is down below.

 

Picture4.pngPicture5.png

 

https://www.dropbox.com/s/e67ti6e8rf8t95i/ehab.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.