Forum Discussion

ageuffrard's avatar
ageuffrard
Frequent Visitor
4 years ago
Solved

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 s...
  • Vijay_A_Verma's avatar
    4 years ago

    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