March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I am importing many files (with the same structure from a folder). These files automatically append to each other.
I required to change one of the column names based on it's index position. (as when new files are added to the folder I can't be certain the same file is going to be taken as the first file. This could lead to the column header name to being different.
= Table.RenameColumns(#"Promoted Headers",{{Table.ColumnNames(#"Promoted Headers"){28}, "--1"}})
I succesfully changed the column header name. Everything is good up until this point!
However, if the column name is already --1. (The name I am trying to change to) PowerBI will return an error saying:
Expression.Error: The field '--1' already exists in the record.
Details:
Name=--1
Value=
I considered using a conditional formula inside of this where I would say If = -1, take the previous query. This isn't working and even if it is, I need to replicate this rename column for 5 columns. I can't take the previous query because it depends on which ones worked.
Sorry If this isn't clear, I can try clarify if the question again.
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
Could you please tell us what's the problem you meet when using the if function?
Best Regards,
Teige
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |