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
ageuffrard
Frequent Visitor

how to lower text with for loop all the column names ?

Hi everyone, 

 

Is it possible to loop with a for to lower the text of all my columns names ?

Like : "step = for (col in previous_step(column_name) ; text.lower(table.columnName), col++) "

 

I start with power query and i struggle a bit.

 

Thanks for your answers.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Use following statement to convert all your column names to lower.

 

= Table.TransformColumnNames(#"Your Previous Step",Text.Lower)

 

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoC4mSlWJ1opRQgKxWI05RiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [cOLUMNA = _t, Columnb = _t, COLumnC = _t]),
    Custom1 = Table.TransformColumnNames(Source,Text.Lower)
in
    Custom1

 

 

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

Use following statement to convert all your column names to lower.

 

= Table.TransformColumnNames(#"Your Previous Step",Text.Lower)

 

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUoC4mSlWJ1opRQgKxWI05RiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [cOLUMNA = _t, Columnb = _t, COLumnC = _t]),
    Custom1 = Table.TransformColumnNames(Source,Text.Lower)
in
    Custom1

 

 

Hi Vijay_A_Verma,

 

I always worked with "Table.ColumnNames" and it returned errors. 

I didn't have the "Table.TransformColumnNames" in mind, and it work very easily !

 

Thanks for the answer and have a good day !

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors