Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
pmsilvbi
Frequent Visitor

Correct way to link tables - relationships / index lookup?

Hi all

I'm struggling to find the best/most efficient way to link some of my tables together. I've tried creating relationships in PowerBi. The only option it will accept is many to many and whilst the data model loads fast,  the data returned in the visuals is not correct.

 

I've tried adding custom columns in Power Query using List.PositionOf to create an index then returning the results. This works great in Power Query! But when I close and apply the changes my model now takes 10+ minutes to load.  My main data source is only 19MB

 

Am I using the wrong methods? Is there a better way?

 

Any suggestions greatly appreciated.

 

pmsilvbi_0-1697798127383.png

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @pmsilvbi ,

 

Difficult to say with any certainty without seeing your model/data/understanding your tables/scenario, but if you're creating a star schema model, your dimension tables must have a unique field in them.

Re: the load time/size, I'm guessing it's because Power Query is scanning your table over and over again to produce the List.PositionOf results. You may be able to avoid this issue by using a buffer function but, again, without seeing your data, it's difficult to say. Either way, I personally don't think you want to be using List.PositionOf for the purpose that you are, it's highly likely there's a more 'correct' way to achieve your desired outcome.

 

If you can share some anonymised examples of the tables you're trying to relate, that would help me to visualise possible solutions.

 

Pete



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

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @pmsilvbi ,

 

Difficult to say with any certainty without seeing your model/data/understanding your tables/scenario, but if you're creating a star schema model, your dimension tables must have a unique field in them.

Re: the load time/size, I'm guessing it's because Power Query is scanning your table over and over again to produce the List.PositionOf results. You may be able to avoid this issue by using a buffer function but, again, without seeing your data, it's difficult to say. Either way, I personally don't think you want to be using List.PositionOf for the purpose that you are, it's highly likely there's a more 'correct' way to achieve your desired outcome.

 

If you can share some anonymised examples of the tables you're trying to relate, that would help me to visualise possible solutions.

 

Pete



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

Proud to be a Datanaut!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors