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
rex9311
Regular Visitor

Can't make a one to one relation

Hey all,

 

I have two Excel data sources:

- Buy-in to retailer

- Sell out to customer

 

The shared ID is the ASIN which is in both sources. However, when I try to make a one-to-one relationship I keep getting the suggestion that only a many to many is possible. What can I do to make the 1:1 relationship?

 

Source 1:

rex9311_0-1649079184816.png

 

Source 2:

rex9311_1-1649079238161.png

 

Message when trying to create 1:1

rex9311_2-1649079372534.png

 

Thanks a lot. 

1 ACCEPTED SOLUTION

Hello, 

 

if you want a one to one relationship you have to make sure that you don't have any duplicates in your data so you have to delete the duplicates.

!!

View solution in original post

8 REPLIES 8
PaulDBrown
Community Champion
Community Champion

Create a new dimension table using the New Table function under modeling in the ribbon and:

Dimension sku =
DISTINCT (
    UNION ( VALUES ( 'DE_Detail View_Dia..'[ASIN] ), VALUES ( 'Sheet1'[sku] ) )
)

Now create one-to-many relationships between this table and the corresponding fields in the fact tables. Use the field from 'Dimension sku' in visuals, measures, filters, slicers...





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hey Paul, thanks for your comment. This was the solution! How do I handle new SKU's that will be added to the sales feeds? Do I need to generate a new table? Or will it update automatically.

Another question, I have succesfully created the relationship, but it displays the same value if I take a measurement from the other table. Is the relationship in the right direction?

 

rex9311_0-1649147514497.pngrex9311_1-1649149481904.png

 

The relationships are correct. However, you need to use the field from the dimension table, Dimension ID_Table[ASIN],  in the visual instead of the sku field





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






The dimension table will update automatically.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hello, 

 

if you want a one to one relationship you have to make sure that you don't have any duplicates in your data so you have to delete the duplicates.

!!

Hey, hmm I understand thanks. Both are big feeds with sales data that contains duplicates. Is there any other way I can connect them? I want to make a table that displays both the product on a line with sales out and buy-in as columns.

Yes ,create a reference table with unique ID and make one to many relation with both and you gonna have the relation between your product and your sales .

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.

Top Solution Authors