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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Join 2 rows from tables

Hi,

i have 2 tables, both has DATAAREAID and JOURNALID.

I want to join these 2 rows, how can i do that?

 

2019-05-16 08_21_22-Senza titolo - Power BI Desktop.jpg

 

Have i to create a compound key? There are other ways?

 

Thanks

1 ACCEPTED SOLUTION

yes, you will have to create a compound key by creating new columns that combine the fields you want to join on.

 

You could potentially create a seperate lookup table with all the distinct values and corresponding index fields but it's probably only worth it if you have lots of records and/or your compound fields are very long

View solution in original post

5 REPLIES 5
selimovd
Super User
Super User

If the 2 tables have exaclty the same columns and you just want to append the two tables, then use the "Append queries" function in Power Query.

Otherwise you should combine the two columns to a new column, maybe seperated by a underscore, and then do the join with this column. Take also a look at surrogate keys in this case.

 

Let me know if one of those things help

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

I have a little confused about your requirement.

What is the " join two rows"? Normally, we could join tables in power bi.

If it is convenient, could you share the data sample which could reproduce your scenario and your desired output so that we could help further on it?

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Sorry,

i mean thath i want to join 2 table with 2 keys.

 

Have to create a compound key? No other ways?

 

Thanks

yes, you will have to create a compound key by creating new columns that combine the fields you want to join on.

 

You could potentially create a seperate lookup table with all the distinct values and corresponding index fields but it's probably only worth it if you have lots of records and/or your compound fields are very long

Hi @Anonymous ,

Normally, we could join multiple tables with UNION function in Power BI.

If you still need help, please share your data sampl and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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