Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey,
I wanted to use union to combine four tables, all with different number of columns and different column values, apart from one same column of 'code number' among all columns. How to do that?
Please help me out
Thanks!
Yes, that would be a merge
https://docs.microsoft.com/en-us/power-query/merge-queries-overview
using Code as the joining field
Hey,
But can I use something else? Like relationship or multiple UNIONS or DAX or something?
HI @123117,
You can try to nested use UNION and SELECTCOLUMNS functions to shape and transform your tables to similar structures before using the UNION function.
UNION function (DAX) - DAX | Microsoft Docs
SELECTCOLUMNS function (DAX) - DAX | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi,
I'm trying merge
But when I'm loading one of the tables I'm getting this error
DataFormat.Error: We couldn't convert to Number.
Details:
A0085805
But when I check the data type options I dont get options apart from; text, whole no, decimal etc theres no option for any
The data type for the current column is Text and there are mixed values in the column
Please help
Hi @123117,
Can you please share some more detailed information about this issue? They will help us clarify your scenario and test to troubleshoot.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
I don't think you can use UNION for this.
Maybe a merge in Power Query but perhaps you can explain further your desired result? with an example?
Hey,
Thanks for your reply
Here's an example of the tables, the columns are separated by |
All tables have different number of columns
Table 1
Code | Description | X | Y | Z
Table 2
Code | Description | A | B | C | D | E
Table 3
Code | Description | Date | L
Table 4
Code | Description | R | S | T | U | V | W
Result output:
Code | Description | X | Y | Z | A | B | C | D | E | Date | L | R | S | T | U | V | W
Basically the result should be all the columns combined and then Ill add some measures too
And all the columns combined with values corresponding to the code.
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
70 |
User | Count |
---|---|
114 | |
100 | |
97 | |
72 | |
68 |