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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Ctisa87
New Member

Self-referencing Columns Won't Stay Put Upon Power Query Refresh

I'm using a large google sheet as my source table and pulling the raw data into an excel spreadsheet via power query. From there, I have added multiple columns to the table that reference the columns from the source data. When I created the columns, I inserted them directly next to the columns they were referencing. However, when I refresh the query, my self-referencing columns are all out of order. Ideally, all self-referencing columns would remain next to the columns they are referencing. Any help would be greatly appreciated.  

7 REPLIES 7
Ctisa87
New Member

Thank you, Yalan. I have read that article before, but it seems to be about keeping collumn rows in sync. This is not my problem. I am asking strictly about the column headers. When I refresh the power query, my self referencing column headers (the custom ones that reference the query columns) change order. 

Please see the example below. The first table is how I would like the column headers to remain organized. The second table is what happens when I refresh the query. The formulas still work and the values are correct, the columns themselves are just out of order. 

Job TimeAdditional Service 1Additional Service 1 BilloutAdditional Service 2Additional Service 2 Billout
3N/A0.00N/A0.00
4Remote Job$25N/A0.00

 

Additional Service 1 BilloutAdditional Service 2Job TimeAdditional Service 2 BilloutAddtional Service 1
0.00N/A30.00N/A
$25N/A40.00Remote Job
jbwtp
Memorable Member
Memorable Member

Hi @Ctisa87,

 

There is a command in PQ Table.ReorderColumns() which deals with this.

Just manually (using your mouse) move the colunms into positions that you prefer them to be and they should fall into places in the output.

 

Cheers,

John 

Does this solution work for columns that are not part of the power query? For instance, the columns that move are the ones I add in excel after the power query has already been performed.

jbwtp
Memorable Member
Memorable Member

Hi @Ctisa87,

 

I beleive so. In my testing the structure of the table (columns order), which I set in Excel did not change after data were updated in the origial table and refreshed. Below "blue" table is the source data, "green" table is an output of a simple query, which reads and returns the source data, Tx columns are manually added in Excel and are not part of the dataset returned by PQ: 

jbwtp_0-1667341001536.png

 

Cheres,

John

v-yalanwu-msft
Community Support
Community Support

Hi, @Ctisa87 ;
First of all, you can read the following post is helpful to you?

Solved: Manually adding column to Table loaded from Query ... - Microsoft Power BI Community
If it doesn't help, can you share more information and screenshots to elaborate about it? for better reproduction.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yalan, please see my response above.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.