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
ROG
Resolver III
Resolver III

Data modelling/relationship help

Hi all,

 

I'm working with Customer Service data, and I need to join the two tables, but I'm not sure how to do that as they don't a same key column.
Call Logs shows info about products and compaints from the customer.

Call Detailed shows the details of the call, such as time the cusotmer called, if the call was abandonned or not or transferred.

 

If a customer call on the same day for different issue, it will have two records.

 

The stakeholders told me the way they identify a customer from the call detailed table in the call logs table is using the customer number (Originator column from the Call Detailed).

If the customer called from their own number, they will be found on the CustomerNumber column, but if the customer called from a different number, they will be found on the CustomerCallingNumber column.

 

My question is: How could I join these two table without creating duplicate values?

 

 

 

ROG_0-1677070324116.png

 

 

Many thanks!

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @ROG 

You can create a new column in Call Logs table

CustomerNo = SWITCH(TRUE(),[CustomerCallingNumber]=BLANK()&&[CustomerNumber]<>BLANK(),[CustomerNumber],[CustomerCallingNumber]<>BLANK()&&[CustomerNumber]=BLANK(),[CustomerCallingNumber])

Then create the relationship between two tables with the fields "CustomerNo" and "Originator"

vxinruzhumsft_0-1677206179525.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.