The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everyone
It is possible to change the name of a column in powerQuery depending of the previous name?
I am trying it in advance editor but I cant reach a solution of this, an example would be very apreciated.
Thanks in advance,
Any ideas?
Greatings
@aoliver You can try unpivoting the columns and then replace the values under Attribute field from FirstName to SecondName, then finally pivot the table again.
Proud to be a PBI Community Champion
@aoliver Could you please provide an example to understand exactly about your requirement.
Proud to be a PBI Community Champion
let
Source = Table.Combine({#"tempAmb(DateStart)",#"tempAmb(DateEnd)"}),
- Here, i want to check if there is a column with the name:"firstName"
#"Renamed Columns" = Table.RenameColumns(Source,{{"firstName", "secondName"}})
in
#"Renamed Columns"
So, if the query has a column called "firstName" it will be call "secondName" at the end.
I'll hope that this example would be enough to understand the problem, if not, I can write pseudocode @PattemManohar
Thanks
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
80 | |
66 | |
53 | |
52 |
User | Count |
---|---|
121 | |
117 | |
77 | |
64 | |
63 |