The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have 15 tables in my datamodel which are connected through direct query to postgres database in Power BI. I want to rename all columns in those 15 tables in bulk not through manually one by one. I want to replace '_' underscore with space. For example,
Old Column Name: customer_account_name , New Column Name: Customer Account Name
Is there any solution then please help.
Below m-query i am using:
NamesBuffered = List.Buffer( Table.ColumnNames( Source ) ),
NewNames = List.ReplaceValue( NamesBuffered, " ", "_", Replacer.ReplaceText ),
Result = Table.RenameColumns( Source,
List.Zip( { NamesBuffered, NewNames } ) )
Thanks in Advance.
Solved! Go to Solution.
Hi @NehaliSurve ,
When the connection mode is DirectQuery mode, you can't rename the column headers in Power Query.
This is because DirectQuery mode does not import data into Power BI, so the column headers are defined by the data source. Therefore, you can't rename the column headers in Power Query.
This is also indicated in the screenshot you provided.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NehaliSurve ,
When the connection mode is DirectQuery mode, you can't rename the column headers in Power Query.
This is because DirectQuery mode does not import data into Power BI, so the column headers are defined by the data source. Therefore, you can't rename the column headers in Power Query.
This is also indicated in the screenshot you provided.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.