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

Pull Values from Many Side of One to Many Relationship into One Side Column

Hi there.  I have two tables that have a one to many relationship connected by a unique ID present in both tables.  I want to pull the unique value(s) of a separate column in the Many side table into the One side table that corresponds to the Unique ID (there should only be one unique value per ID but no database is perfect so there may be multiple).  In applied terms, the One side table has an unduplicated list of all individuals in the system, and the Many side table has all of the claims for each of the users (connected via Unique ID#).  I want to pull the associated Name of the person tied to the Unique ID# from the Claims table (Many table) and have it be a column in the unique individual list table (One table).  More or less, I want to run a calculation to identify all name mismatches between the two tables anchoring on the unique inidividual table. 

3 REPLIES 3
Anonymous
Not applicable

If I've understood you correctly, I was able to pull the values using a measure like:

vals = MINX('many_table', RELATED('one_table'[name]))
johnt75
Super User
Super User

You could extend Syk's answer to avoid having to create the column itself and simply create a column on the many table which flags if the two names don't match, e.g.

Name mismatch = 'Many table'[Name] <> RELATED( 'One table'[Name] )

Any rows with TRUE in this column have a mismatched name.

 

Syk
Super User
Super User

You may want to do it the other way around, bring the name from the "One table" into the "Many table". You can do it with a calculated column in the "Many table". Something that looks like this, assuming you have the relationships set up already

One_table_name = related('One Table'[Name])

 

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.