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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to relate different tables to create a new column in M language (Power Query)

Hello Friends:

I'm trying to relate 2 tables in Power Query to create a new column.

I did this in DAX and it worked well, but I didn't know how to do it in Power Query.

Here's the DAX Code I want to transfer to Power Query:

EE. RR. =
IF(
Cartera_Vigente[RUT CLI.] = RELATED(Emp_Relacionadas[RUT]),
"Yes",
"No"
)
Hoping that you can help me, I thank you from now on, greetings...

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try if append/merge can help

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Any suggestion @ImkeF 

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

Hi @Anonymous 

like @amitchandak said, a merge operation in Power Query will get you there.

Merge on the the same field with which the tables are connected in the data model and expand RUT. Then add a conditional columsn that checks if RUT is empty or not.

This will guide you through the main steps: https://support.microsoft.com/en-us/office/merge-queries-power-query-fd157620-5470-4c0f-b132-7ca2616d17f9

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors