March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, is it possible to combine 2 tables some column match but some aren't match without any matching rows. Just wanted to make this 2 dataset saved as 1 table?
Here's the column for my 1st data set
Here's the column for my 2nd data set
For the columns that are matching the data would just append and the other columns that arent present on the 1st table will beadded. Thanks in advance
Solved! Go to Solution.
Hi @xRTP ,
Table1:
Table2:
Please try following measure to create a new table to combine two tables:
Table = UNION(
SELECTCOLUMNS('Table1',"Column1",'Table1'[Column1],"Column2",'Table1'[Column2]),
SELECTCOLUMNS('Table2',"Column1",'Table2'[Column1],"Column2",'Table2'[Column2])
)
Is this the result you want?
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @xRTP ,
Table1:
Table2:
Please try following measure to create a new table to combine two tables:
Table = UNION(
SELECTCOLUMNS('Table1',"Column1",'Table1'[Column1],"Column2",'Table1'[Column2]),
SELECTCOLUMNS('Table2',"Column1",'Table2'[Column1],"Column2",'Table2'[Column2])
)
Is this the result you want?
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, tried this and works like magic! Thanks a lot!!
Hi @xRTP ,
you can try maybe with
DISTINCT(UNION(Table1,Table2))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Do i need to create a new table that consist all of the columns then use union all? Actually I have total of 3 table, 1 for mapping and 2 for may dataset. Im thinking to create 1 more table > use union all > created union table to make a relationship with my mapping table? Is it possible?
Hi @xRTP ,
You can create a calaculted column in the table 1 and use LOOKUPVALUE
https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax
to get values from the first column of table 2
Lookupvalue cant get duplicates, im having duplicate on column "employeeName" since the data was entered per month. Is there any other solution? Im getting this error because of duplicate "A table of multiple values was supplied where a single value was expected."
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
86 | |
77 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |