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 there
I have some really bad quality data I need to use unfortunately and one of the issues is data in parenthesis within this field. I need some of the data in parenthesis, and some I do not. I want to see what the data looks like if remove data between 1 and 2 character length within parenthesis e.g. (EU) and keep anything greater than 2 characters within parameters e.g. (SGP).
Is this possible?
Solved! Go to Solution.
Hi @Anonymous ,
Try this custom column:
let _text = Text.Split([Current Column], " ") in
Text.Combine(List.RemoveNulls(List.Transform(_text, each
if Text.StartsWith(_, "(") and Text.EndsWith(_, ")") then
if Text.Length(_) = 3 or Text.Length(_) = 4 then null
else _ else _
)), " ")
you could try in PowerQuery, by going to 'Transform data' and then edit that column. there is an option to extract text before and after delimiters.
hope it helps.
It doesn't allow you to specify the number of characters between the delimiters unless I am doing something wrong
I want to say: (??) = remove (???) = keep.
Here are some examples of the data and my desired result
Current Column | Desired Column |
MODA KTB (ME) | MODA KTB |
Petroliam Berhad (PETRONAT) | Petroliam Berhad (PETRONAT) |
MODA Kuwait | MODA Kuwait |
Hotel & Property Development (Kenal) Ltd | Hotel & Property Development (Kenal) Ltd |
Everhouse LLP (EU) | Everhouse LLP |
Hi @Anonymous ,
Try this custom column:
let _text = Text.Split([Current Column], " ") in
Text.Combine(List.RemoveNulls(List.Transform(_text, each
if Text.StartsWith(_, "(") and Text.EndsWith(_, ")") then
if Text.Length(_) = 3 or Text.Length(_) = 4 then null
else _ else _
)), " ")
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |