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
szub
Helper III
Helper III

Table Relationship Issues

Hello,

 

I have a sales by serial number and claims by serial number table and the only common field is the serial number.  Both tables can have the serial number listed more than once for various reasons, so I created a unique key table with the serial numbers from the sales table only listed once and created a relationship to both tables.  When I try to create visuals with information from both tables, I recieve an error that it can't display the visual because it can't determine the relationship between two or more fields. 

 

I am looking for suggestions on how I can get claim data visuals for serial numbers sold.  I have tried to use LOOKUPVALUE and RELATED or RELATEDTABLE without success, but maybe I am doing something incorrectly.

 

Any suggestions or guidance will be appreciated.

 

Thanks in advance

9 REPLIES 9
v-juanli-msft
Community Support
Community Support

Hi @szub 

Modified "SERIAL_NBR" column of your "TransactionData" table as below

Capture8.JPG

Create relationships

Capture7.JPG

srial 1 has 1 row record in "Claim" table, serial 1 has 2 rows in "Transaction" table, so wen adding columns from two tables in to a visual, it shows all data from two tables like crossing join.

Capture9.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-juanli-msft ,

 

Thank you for your response.  I realized that I did not have a serial number listed more than once in my sample Sales Transaction data once I had left for the day and have now corrected.  Thank you for realizing that.   

 

All the training and dicussions I have had with others have advised to stay away using many to many relationships, which is why I did not use it.  Are there any negatives that you have experienced with using Many to Many?

 

Thank you

Hi @szub 

Your screenshot shows a workaround for many to many relationships  for two tables in power bi.

Please see differences between two methods:

Use relationships with a many-many cardinality

your workaround

 

One big disadvantage is many to many relationship may slow the performance for the report.

For specific scenario, please use Performance Analyzer to examine report element performance and decide which method to use.

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

sturlaws
Resident Rockstar
Resident Rockstar

could  you also make a mockup in excel of how you want your table/output to look like?

Hi @sturlaws ,

 

I want to be able to create a visual with detailed claim information only for each transaction serial number that has a claim, like 

 

sturlaws
Resident Rockstar
Resident Rockstar

Hi @szub,

 

do you have a screen shot of your model? Or could you share the report?(upload to onedrive/dropbox/other and share the link).

 

Cheers,
Sturla

Hi @sturlaws,

 

Here are the relationships between the tables:

 
 

Relationship.png

 

Thank You

VasTg
Memorable Member
Memorable Member

@szub 

 

Provide sample data for transaction and claims tables.

Connect on LinkedIn

Hello @VasTg ,

 

Here is sample Claim Data:

Claim #Claim DateClaim TypeStatusSerial #Svc AgentCustomerFail DateRepair Date# TripsLaborPartsOtherTotal
Claim 110/21/2019WarrantyPaidSerial 1SA1Cust110/15/201910/15/20191237.200237.16
Claim 212/22/2018InstallationPaidSerial 2SA2Cust212/13/201812/13/20181216.6020.49237.12
Claim 35/17/2019WarrantyPaidSerial 2SA2Cust25/14/20195/14/2019125000250
Claim 48/22/2019WarrantyPaidSerial 2SA2Cust28/16/20198/16/20191286.247.564.76338.48
Claim 59/1/2019InstallationPaidSerial 3SA5Cust38/16/20198/16/20191629.2510511190.12
Claim 610/1/2019WarrantyPaidSerial 3SA5Cust310/1/201910/1/2019110020050350

 

Here is sample TransactionData:

BRANDInvoice DateSales #Model #ITEM_DESCQtySERIAL_NBR
WIDGIT5/20/2019S123Model 1Unit XYZ1Serial 1
WIDGIT11/29/2017S123Model 2Unit XYZ1Serial 1
WIDGIT11/29/2017S125Model 3Unit XYZ1Serial 2
WIDGIT9/20/2019S125Model 4Unit XYZ1Serial 2
WIDGIT9/20/2019S127Model 5Unit XYZ1Serial 3
WIDGIT10/15/2019S127Model 6Unit XYZ1Serial 4

 

 

Thank you

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.