Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi folks.
I'm trying to verify if a text contais "#<number>." (Hashtag, number and a dot) and this number can be anyone (from 0 to infinity)
Can anyone help me with powerquery formula?
TY!
Solved! Go to Solution.
@Anonymous
1. Create custom function 'fnRegExpExtract':
let fx=(txt as text)=>
Web.Page(
"<script>
var x = '"& txt & "';
var delim = '-';
var pattern= /" & "\#\d*\." & "/gi;
var result=x.match(pattern).join(delim);
document.write(result);
</script>")[Data]{0}[Children]{0}[Children]{1}[Text]{0}
in
fx
2. Add new column by 'Invoke custom function', choose function and column with data or add this code;
Table.AddColumn(prev_step, "fnRegExpExtract", each try fnRegExpExtract([column_with_data]) otherwise null)
@Anonymous
1. Create custom function 'fnRegExpExtract':
let fx=(txt as text)=>
Web.Page(
"<script>
var x = '"& txt & "';
var delim = '-';
var pattern= /" & "\#\d*\." & "/gi;
var result=x.match(pattern).join(delim);
document.write(result);
</script>")[Data]{0}[Children]{0}[Children]{1}[Text]{0}
in
fx
2. Add new column by 'Invoke custom function', choose function and column with data or add this code;
Table.AddColumn(prev_step, "fnRegExpExtract", each try fnRegExpExtract([column_with_data]) otherwise null)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |