Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello ,
i need to find the position of the first number in a column
Thank you i find this command but it gives me an error
SEARCH(\"[0-9]\", <string>)
thank you
Solved! Go to Solution.
Hi @cristianj
You need to use Power Query and the Text.PositionOfAny function.
Text.PositionOfAny - PowerQuery M | Microsoft Learn
Here's the query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMkxMSlaK1YlWSkwyhDAqKquMYIKGiUZJxgj5FKPUNGOl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [String = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"String", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Pos of First Number", each Text.PositionOfAny([String], {"0".."9"}))
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
pls txry this
Hi @cristianj
You need to use Power Query and the Text.PositionOfAny function.
Text.PositionOfAny - PowerQuery M | Microsoft Learn
Here's the query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMkxMSlaK1YlWSkwyhDAqKquMYIKGiUZJxgj5FKPUNGOl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [String = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"String", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Pos of First Number", each Text.PositionOfAny([String], {"0".."9"}))
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
72 | |
39 | |
28 | |
27 |
User | Count |
---|---|
97 | |
97 | |
58 | |
45 | |
42 |