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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Renaming Columns in Power Query Gives Error

Hello!

 

 I am working with a large dataset, and need to organize the sales summary across different company divisions. In our database we use acronyms like "RW" for "Retail West" divisions. I want to make the report very user friendly, so I decided to replace all of these short acronyms with their actual names. This was going well ( I was using replace all in power query editor ) until I ran into this error part-way through my query.  The replace statements caused no issue, until I added this final one. I am working with data off of a IBM DB2 Database.

 

I attached 3 photos of: the query before the error, the error itself, and the query after the error. I think the error is with my dataset, and not quite a power bi issue, But, do you guys have any idea what may have caused this? or if there is another way to change the replace the names of these values? at least for those who view the report.Photo 1, before the error (working Query)Photo 1, before the error (working Query)After I added another "replace value"After I added another "replace value"the advanced query editor, after error was giventhe advanced query editor, after error was given

 

This last photo is a basic example of how I use these in a table. Some are still unchaged ("I", "MT"...) but others are replaced.Screenshot (34).png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please check if this helps.

sql - DB2 issue Getting -101 for 300 records but same query working for 1000 and 10000 records

 

You might also consider using DAX to create a calculated column.

 

Selling Division 2 = 
SWITCH(
    'Table'[Selling Division],
    "RW","Ridgeway",
    "HP","Howard Miller",
    "KI","Kieninger",
    'Table'[Selling Division]
)

 

You may also consider completing these replacements in the data source.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

Please check if this helps.

sql - DB2 issue Getting -101 for 300 records but same query working for 1000 and 10000 records

 

You might also consider using DAX to create a calculated column.

 

Selling Division 2 = 
SWITCH(
    'Table'[Selling Division],
    "RW","Ridgeway",
    "HP","Howard Miller",
    "KI","Kieninger",
    'Table'[Selling Division]
)

 

You may also consider completing these replacements in the data source.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors
Top Kudoed Authors