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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Column does not exist or does not have relationship

I have 3 tables, 2 reference table and 1 fact table.

 

My goal is to get the ITEM_COST in the Reference 2 into the Fact 1 using the link that connects to Reference 1 because Reference 2 and Fact 1 does not have common field.

 

Laedays_0-1625582407489.png

 

But i am having error "The column 'Reference 2'[ITEM_COST]' either doesn't exist or doesn't have a relationship to any table available in the current context."

 

Column = IF(RELATED(Reference 1[ORG] = "ABC"),RELATED(Reference 2[ITEM_COST])*RELATED(Reference 1[QUANTITY_RATE])
 
How do i make it work?
 
 
2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

I am not very clear about the data in your table and the results you want to output. Based on my understanding, you can create a virtual table as follows:

1.original data.

vyalanwumsft_0-1625727272709.pngvyalanwumsft_1-1625727300623.png

2.create a new table.

Fact = GENERATE(FILTER('Reference1',[ORG]="ABC"),FILTER('Reference 2',[ITEM_COST]="ABC"))

3.then create a coulmn.

Column = [QUANTITY_RATE]*[item]

The final output is shown below:

vyalanwumsft_2-1625727395506.png

If it is not correct, can you share pbix or screenshots whitout any sesentive information and the results you want to output?

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Anonymous don't take me wrong, it is a very poor model, first, related wouldn't work if you have many to many relationships. You have to prepare/transform your data to create one to many relationships between your fact and dimension table and then it should be easier.

 

Follow us on LinkedIn

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

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.