Forum

Add Column in Power...
 
Notifications
Clear all

Add Column in Power Query based on values in related table

3 Posts
2 Users
0 Reactions
177 Views
(@godzilla)
Posts: 2
New Member
Topic starter
 

I have to preface with I'm new to M language and Power Query.

I have two tables: LAPTOP INVENTORY and RETIRED LAPTOPS. The two tables have a "Serial#" relationship.

What I want to do is ADD COLUMN to LAPTOP INVENTORY table indicating whether the laptop has been retired, based on Serial# lookup in the RETIRED LAPTOPS table. It must be simple but I struggling with it.

 
Posted : 26/04/2023 10:24 am
Riny van Eekelen
(@riny)
Posts: 1201
Member Moderator
 

Ask for a simple solution and you'll get one 🙂

I merged (Left Outer join) the Laptop table with the Retired table and expand. All rows with a serial number in the Retired column are retired. All with null are not.

See attached and come back here if you get stuck.

 
Posted : 26/04/2023 11:17 am
(@godzilla)
Posts: 2
New Member
Topic starter
 

Thanks Riny, it works for me.

 
Posted : 27/04/2023 11:01 am
Share: