Mass capitalized words in query editor

Hi @ysherriff,

Here you go. Just copy the sample into a new blank query. This will transform all of the columns in your table at once.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8iotLlEozs9NVShKzEvJz1VISSxJVNJRAnL09PQgMrn5RalKsTrRSoZGxiamFkDZ/CKFRIXk/NykTAVDXSNdY4X87MRKe6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    AllCaps = Table.TransformColumns( Source, {}, each Text.Upper(_) )
in
    AllCaps

.
If you have other data types than text in any of the columns, add a try-otherwise clause to handle subsequent type mismatch errors by returning the initial value for example.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8iotLlEozs9NVShKzEvJz1VISSxJVNJRAnL09PQgMrn5RalKsTrRSoZGxiamFkDZ/CKFRIXk/NykTAVDXSNdY4X87MRKe6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    AllCaps = Table.TransformColumns( Source, {}, each try Text.Upper(_) otherwise _ )
in
    AllCaps

I hope this is helpful.

2 Likes