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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Write a value to table based on column matching

I'm not sure I'm asking the question correctly, but here it goes:

 

I have two tables. Table1 has these columns:

 

Client Name

Unique ID

Previous Year's Revenue

 

Table2 has:

 

Client Name

...and a bunch of other columns not relevant here

 

I am trying to pull the Unique ID and PY Revenue values from Table1 into Table2, by matching on Client Name. I can't quite figure out how to do this without throwing errors. And yes...I have to match on Client Name in this case. Help??

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

Besides merging the two tables in Power Query you can try as calculated columns in Table 2.

Unique ID = LOOKUPVALUE(Table1[Unique ID], Table1[Client Name], Table2[Client Name])

and then rpeat same pattern for PY revenue.

PY Rev = LOOKUPVALUE(Table1[Previous Years Revenue], Table1[ClientName], Table2[ClientName])

 

I hope this solves this for you. Thanks

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This did the trick, thank you!!

Whitewater100
Solution Sage
Solution Sage

Hi:

Besides merging the two tables in Power Query you can try as calculated columns in Table 2.

Unique ID = LOOKUPVALUE(Table1[Unique ID], Table1[Client Name], Table2[Client Name])

and then rpeat same pattern for PY revenue.

PY Rev = LOOKUPVALUE(Table1[Previous Years Revenue], Table1[ClientName], Table2[ClientName])

 

I hope this solves this for you. Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.