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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Pbiuserr
Post Prodigy
Post Prodigy

How to refer to many-to-many table in calculated column

Hello,

I have data model like pic related. I want to create a new calculated column in fact table - it suppose to be Column from WageTable1 [Co1]/ Column from WageTable2 [Col2], however I can't access WageTable1 by using RELATED() or directly. Is it because of many to many relationship? (at the moment it cannot be changed by engineers). Is there a way to perform such calculation?

 

Like one common thing between these tables are ID

 

Pbiuserr_0-1658744807003.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pbiuserr , You can try relatedTable or simple x funxtions with join

 

maxx(relatedtable(Table2), Table2[Value])

 

 

or

 

Maxx(Filter(Table2, Table2[id] = Table1[id]), Table1[Value])

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You would need to use LOOKUPVALUE specifying all the columns which would give you a unique value from WageTable1. It would also be a good idea to specify an alternate result in case LOOKUPVALUE fails to determine a single value, otherwise it could give you an error and the whole column would be marked as error.

amitchandak
Super User
Super User

@Pbiuserr , You can try relatedTable or simple x funxtions with join

 

maxx(relatedtable(Table2), Table2[Value])

 

 

or

 

Maxx(Filter(Table2, Table2[id] = Table1[id]), Table1[Value])

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors