The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance 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!
User | Count |
---|---|
78 | |
77 | |
38 | |
31 | |
28 |
User | Count |
---|---|
106 | |
98 | |
55 | |
49 | |
47 |