Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
i have 2 tables, both has DATAAREAID and JOURNALID.
I want to join these 2 rows, how can i do that?
Have i to create a compound key? There are other ways?
Thanks
Solved! Go to 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
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
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
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |