cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VSchepens Regular Visitor
Regular Visitor

How to union or append tables with different column order?

Hi,

 

We have two tables created via DAX that we want to append to one table.

 

Because we created them via DAX we can't use Query Editor and we can't use UNION() because the order of columns is different. Newly created columns are added at the end of the first table and they need to be combined with columns at the beginning of the second table.

 

Any ideas on this?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to union or append tables with different column order?

Hey,

 

not sure if I understand your requirements correctly, if you want to append ROWS (the combined table gets longer) maybe

SELECTCOLUMS will be helpful https://msdn.microsoft.com/en-us/query-bi/dax/selectcolumns-function-dax

 

If you want to make your table wider (more columns) then you might consider

Maybe you also might consider to create sample data, upload a PBIX to onedrive or dropbox and share the link maybe with scribble visaulizing the expected result.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
2 REPLIES 2
Super User
Super User

Re: How to union or append tables with different column order?

Hey,

 

not sure if I understand your requirements correctly, if you want to append ROWS (the combined table gets longer) maybe

SELECTCOLUMS will be helpful https://msdn.microsoft.com/en-us/query-bi/dax/selectcolumns-function-dax

 

If you want to make your table wider (more columns) then you might consider

Maybe you also might consider to create sample data, upload a PBIX to onedrive or dropbox and share the link maybe with scribble visaulizing the expected result.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
Highlighted
vjnvinod Member
Member

Re: How to union or append tables with different column order?

@VSchepens

 

selectcoloumns should do

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 425 members 4,298 guests
Please welcome our newest community members: