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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JonSwed
Advocate II
Advocate II

Using M query to obtain a value from table a, based on table b's contents

Hi all,

I have two tables where I want to obtain a value from table b, if values from table a match those in b.

I have a calculated column which does this:


Match from GA = LOOKUPVALUE(Google_Analytics_income[sessionCampaign], Google_Analytics_income[sessionCampaign], 'Email_date'[email_NAME])


This works, but my question is, what would the equivalent query look like in M? I would prefer to add this as an actual column in my data table.

Many thanks,
John.




1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@JonSwed,

 

In Power Query, you can use Merge Queries to join the two tables, and return the column(s) you want from table B.

 

DataInsights_0-1620416073813.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@JonSwed,

 

In Power Query, you can use Merge Queries to join the two tables, and return the column(s) you want from table B.

 

DataInsights_0-1620416073813.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors