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
jribs
Helper I
Helper I

Invalid Relationship when attempting Many-To-One despite Unique Values

Hey there,

 

When attempting to create a relationship between two tables, Power BI is simply saying that selecting a "One to Many" relationship for a lookup-to-fact table is invalid. Both are from a SAP BW data source. Somewhere on the internet, it said to try and "Remove Errors" from both Key columns. This did not work either. Any suggestions?

 

The error where lookup table = "ABC Indicator" and fact table = "Maintenance Items":

jribs_0-1609703646907.png

 

The lookup table (ABC Indicator) only has 4 rows, so no double values here:

jribs_1-1609703759699.png

 

Thank you in advance

1 ACCEPTED SOLUTION
jribs
Helper I
Helper I

@amitchandak @parry2k 

 

Thank you both for reaching out. 

 

Changing the cross-filter did not work. However, your feedback on it being strange it was an option helped out. SAP Business Warehouse uses "#" as a blank value key (with the intention, I assume, of not using blank values). After replacing all "#" values with "NA" in both [ABC Indicator].Key and [Maintenance Item].ABC_Key, now the relationship shows a One to Many relationship as the default without error.

 

Before closing this out, where might I be able to report this to Microsoft, assuming this is a bug where Power BI does not escape "#" values?

 

Thank you all for the help

jribs_0-1609737463420.png

 

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@jribs I would surely recommend reporting it as a bug. It's a bit a strange.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

jribs
Helper I
Helper I

@amitchandak @parry2k 

 

Thank you both for reaching out. 

 

Changing the cross-filter did not work. However, your feedback on it being strange it was an option helped out. SAP Business Warehouse uses "#" as a blank value key (with the intention, I assume, of not using blank values). After replacing all "#" values with "NA" in both [ABC Indicator].Key and [Maintenance Item].ABC_Key, now the relationship shows a One to Many relationship as the default without error.

 

Before closing this out, where might I be able to report this to Microsoft, assuming this is a bug where Power BI does not escape "#" values?

 

Thank you all for the help

jribs_0-1609737463420.png

 

amitchandak
Super User
Super User

@jribs , I doubt the key is repeating in ABC Indicator or has a blank/null value.

Second thing is that you need to have a single direction relation from ABC Indicator to Maintenance Items. But if your keys are correct, it will not show the other option.

parry2k
Super User
Super User

@jribs Bit confused, how come an option showed up in cross filter direction when there is "one to many" relationship. This is super weird. I cannot even reproduce it. This option only available when there are "many to many" relationships.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

BA_Pete
Super User
Super User

Hi @jribs ,

 

It looks like you're trying to set up your relationship whereby your Many side filters your One side.

Try changing 'Cross filter direction' to 'Single (ABC Indicator filters Maintenance Items)'.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.