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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors