Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
SYM1986
Helper I
Helper I

Column order in data view

Hi all,

I have a report,after  i load the data soure. There are five queries,2017,2018,2019,2020, 2021.

These queries have the same column order in power query.But afer i apply the querie,four of them have change their column order in the data view, Thie cause the dax ‘union’ failed.(see the following photos)

Capture.JPG

The 2021 have the same colum order in the data source and the power query,(2017,2018,2019,2020, change the column order),i only do the same action of remove colum in power query, and after the action they have the same column order.

Can anyone help to tell me why it show this in data view and how to fix this?

thank you

 

1.JPG

2.JPG3.JPG

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

With UNION function, columns are combined by position in their respective tables.


If you want to combine multiple queries into a query, you can also use Append queries in Power Query Editor as an alternative which are combined by column headers.

 

Regards,
Community Support Team _ Jing

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

With UNION function, columns are combined by position in their respective tables.


If you want to combine multiple queries into a query, you can also use Append queries in Power Query Editor as an alternative which are combined by column headers.

 

Regards,
Community Support Team _ Jing

Yes @v-jingzhang ,it‘s a very good solution. Thank you.

amitchandak
Super User
Super User

@SYM1986 , does column order matter for you here(date studio)?

It can change based on the order columns are added or removed.

You may have to check all steps in advance editor (right-click in power query on the table and open it)

 

Hi @amitchandak , it affect the DAX of union.

The steps in advance editor now are same, but the queries were added in each year,  so i adjusted some steps before 2021.

I delete all the queries, and reload all the datas, now they have the same order.

thank you.

@SYM1986 , DAX union can have an impact. You have to use select columns in that case,

 

But best was what you have done.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.