cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
meddojeddo
Helper IV
Helper IV

Error when editing column names in Advanced Query Editor

Two columns were added to the source table which have the same names that columns already loaded were changed to. So I went into the Advanced editor and changed the names of the already loaded columns again to be different from the new columns added to the table. The preview showed the new columns added to the table. But then when close and apply, I get an error saying "Something went wrong: An error occurred while rendering the report" with no additional info other than a "Copy details" option and a "Report this issue". What is the problem? Is there something else I need to do in order to change the column names?

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

Hi @meddojeddo 

I don't see any issues with the M code no that you have suffixed the names with "old".

 

I was in a similar situation and I did create a new connection to the file and on the new connection I replaced the M code shared by you.

 

Can you give it a try If it doesn't work you have to give the file used in it with only one row and you can replace all the values in that row with test data.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

9 REPLIES 9
pranit828
Community Champion
Community Champion

HI @meddojeddo 

Yep, create a new connection.

 

you can try the approach of changing the name in datasource itself if it will be consistent for later refreshes.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
pranit828
Community Champion
Community Champion

Hi @meddojeddo 

You need to modify the step which initially changed the name of the two previously added column to the non coinciding name.

 

If it still doesn't help. Copy the M Code and recreate the table as new. Make sure the steps are corrected as mentioned above.

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@pranit828 I modified that step by changing the new names to something other than the column names being added. So then in the preview it had both the new columns and the old columns, which is what I am looking for. But then when I close and apply I get that error. 

Hi @meddojeddo 

Can you send me the file or the M Code for the same.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

@pranit828 I don't think I can share the data due to data security issues, but I am wondering if it could be that adding those two additional columns throws off the value positions of the columns(e.g. Value1, Value2, etc.) and that is what is causing the issue since those value numbers are referred to when changing type in later query steps. But if that is the case, do you happen to know in what order the columns are numbered?

HI @meddojeddo 

The columns are sequenced as per the query.

I may be able to help if you can send the M code for the same.

Go to advance editor copy the code, this doesn't have the data.

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
pranit828
Community Champion
Community Champion

Hi @meddojeddo 

I don't see any issues with the M code no that you have suffixed the names with "old".

 

I was in a similar situation and I did create a new connection to the file and on the new connection I replaced the M code shared by you.

 

Can you give it a try If it doesn't work you have to give the file used in it with only one row and you can replace all the values in that row with test data.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Alright, reconnecting to the data source and copying the M code into the advanced editor and deleting the old one solved the issue. Thanks. 

@pranit828 so I should create a new connection to the same data source and then go to the advanced editor and insert this M code? 

 

Would changing the name of the new columns in the source data to something other than the named that the old columns were originally changed to also solve the issue?

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors