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
cole_lehmkuhler
Helper II
Helper II

Creating a lookup table, but one problem...

Here's my lookup table so far

Start               End            Division

0000              9999              Gas

10000            19999          Diesel

20000             29999            Marine

30000              39999           Gas

40000              49999           Trans

 

So obviously I have gas twice and can't make a relationship because the other table I'm making a relationship with has repeats of gas diesel marine all of those. I need to know how to fix this so I can do both ranges for gas so when it is looked up I still get Gas, but I need to make a relationship between these two tables as well. Help!

 

 

1 ACCEPTED SOLUTION
chrisu
Responsive Resident
Responsive Resident

One way to handle this many-to-many problem is to create a "bridge" table that contains a unique list of divisions.  Your tables can then be connected by many-to-one relationships.  If you set the relationship to be bi-directional, then filters should flow from the ranges table through the division table and into the sales table, effectively creating a many-to-many relationship.  

 

The model would look something like this:

 

LookupTable.JPG

View solution in original post

4 REPLIES 4
chrisu
Responsive Resident
Responsive Resident

One way to handle this many-to-many problem is to create a "bridge" table that contains a unique list of divisions.  Your tables can then be connected by many-to-one relationships.  If you set the relationship to be bi-directional, then filters should flow from the ranges table through the division table and into the sales table, effectively creating a many-to-many relationship.  

 

The model would look something like this:

 

LookupTable.JPG

Thank you!!!!! That worked!

sornavoor
Resolver I
Resolver I

What are the columns in the other table? And, what are you looking up one/ trying to join with? 

Its going to join with another table that has 100s of thousands of rows that are sales. These sales are labeled into divisions as well and contain gas and the other field values as well, but as it has so many rows there are thousands and thousands of repeats as well in. I would have no problem doing this except for that the in the table I posted there are two ranges for the "gas" value. Sorry if this is hard to understand I'm very very new to Power BI.

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.