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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
k66rl
Regular Visitor

Adding another column to a data table referencing results from another table? MERGE/LOOKUP??

Need to add a column to DATA table; using the value from data table 2 "Effective date"? So when Period[Table1]=Period[Table2] the resulting entry should be "Effective date"

 

What's the easiest way to do this in Power BI? 

 

Table 1: DATA (Raw data from accounts)

Period is the output that I require transforming to a date with an additional column. 

The corresponding output is referenced in table 2.

 

k66rl_0-1595563454152.png

 

Table 2: Data Table

k66rl_1-1595563541810.png

Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @k66rl 

You may have a try by Merge.

1.png

Then we select two tables and Period columns in two tables:

2.png

Result:

3.png

However, when we use calculated table, we cant use merge in Power Query Editor, so at this time we have to use Dax to build a calculated column.

 

Effective Date =
LOOKUPVALUE (
    'Table'[Effective Date],
    'Table'[Period], Data_Calculated[Period]
)

 

Result:

4.png

You can download the pbix file fro m this link:

Case_Adding another column to a data table referencing results from another tableMERGEorLOOKUP.pbix 

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @k66rl 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your onedrive business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @k66rl 

You may have a try by Merge.

1.png

Then we select two tables and Period columns in two tables:

2.png

Result:

3.png

However, when we use calculated table, we cant use merge in Power Query Editor, so at this time we have to use Dax to build a calculated column.

 

Effective Date =
LOOKUPVALUE (
    'Table'[Effective Date],
    'Table'[Period], Data_Calculated[Period]
)

 

Result:

4.png

You can download the pbix file fro m this link:

Case_Adding another column to a data table referencing results from another tableMERGEorLOOKUP.pbix 

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@k66rl , you want period Table 2 to table 1

 

If there is 1 to Many join between table 2 and Table

 

New column in table 1

Period = related(Table2[FY Period])

 

if they are not related to it, not 1 -M

 

Period = maxx(FILTER(Table2,Table2[effective Date]=Table1[Transcation Date]),Table2[FY Period])

 

In case you are looking for a period calculation

https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...

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

The tables currently aren't linked; table 2 is just a reference with the correct values for "effective date" which correspond to Period.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.