Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table that contains data extracted from a sql database, I duplicated it by changing your query to just the date of the data I need, for example in table 1 I have data from October and in table 2 I have data from january to september the structure of the two tables are exactly the same, when I perform the union function (table 1; table2) the resulting table has error in the data, for example I have the customer column and its values are being displayed in the product column and this error occurs and several others. fields, how can I solve this?
Solved! Go to Solution.
You can use the SELECTCOLUMNS in your UNION to define the order.
NewTable =
UNION (
SELECTCOLUMNS ( Table1, "Field1",Table1[Field1],"Field2",Table1[Field2]),
SELECTCOLUMNS ( Table2, "Field1",Table2[Field1],"Field2",Table2[Field2])
)
hi @vitexo87
If the two tables have the same column order? please keep them with same column order.
and you still have the problem, please share a simple sample pbix file.
Regards,
Lin
You can use the SELECTCOLUMNS in your UNION to define the order.
NewTable =
UNION (
SELECTCOLUMNS ( Table1, "Field1",Table1[Field1],"Field2",Table1[Field2]),
SELECTCOLUMNS ( Table2, "Field1",Table2[Field1],"Field2",Table2[Field2])
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |