Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello
What is the M code for identifying a row/record with all uppercase letters?
Thanks
John Haase
Hello here is the solution that works for my sitution. You can subsitute {0..9} or lower upper case in the {..}
= Table.AddColumn(#"Renamed Columns1", "New", each Text.Select([Name], {"a".."z"}))
Thanks
Good day johnlhaase,
The essence of the following is to take a string and compare it to itself in uppercase, i.e.
if "string" = Text.Upper("string") then true else false
The idea could be applied to a single column or a record. In the case of a record the steps are:
Here is some sample code, the interesting part starting with #"Convert record to text".
Hope this helps
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"i45WSszJUcjJL08tUtJBYRsaGSvF6kQrOfr4KIQGBLgGAcWQ2QaG+kBkZGBkAlbmm1mRmqLgnFicCpRD4YQEhbqClSCbjmwS0CY9E1MMy1AMSUxKxrQGxelQBchiWE1AtgKbASiaUBSDFMQCAA==",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [#"Column 1" = _t, #"Column 2" = _t, #"Other types" = _t]
),
#"Convert record to text" = Table.AddColumn(Source, "Is All Upper", each Text.Combine(Record.ToList(_))),
#"Test for uppercase" = Table.TransformColumns(
#"Convert record to text", {{"Is All Upper", each if _ = Text.Upper((_)) then true else false}}
),
#"Changed Type" = Table.TransformColumnTypes(#"Test for uppercase", {{"Is All Upper", type logical}})
in
#"Changed Type"
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |