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,
I need help to remove the text which is inside the square brackets along with the braces. I have pasted a sample text message.
Need to remove the brakets and the data inside.
Thanks !
Hello @Ganesh [\"mailto:Ganesh@gmail.com\"], Good Day😊 As we can see your new email address is updated. [\"cid:image001.png\"][\"cid:image002.png\"] [\"cid:image003.png"] Could you please explain in which application you are facing the issue .
Solved! Go to Solution.
pls try this
[
f = Text.Combine( List.Select(
List.Transform(
Text.Split([Column1],"\r\n"),
(x)=> Text.Trim(x)),
(x)=> x <>""),", "),
to = Text.Combine( List.Select(
List.Transform(
Text.Split(f,"["),
(x)=> if Text.Contains(x,"]") = true then Text.Trim( Text.AfterDelimiter(x,"]")) else Text.Trim(x)),
(x)=> x <>""),", ")][to]
Hi @Ahmedx
Thank you so much for the sloution it worked like a magic.
I just have one more last concern
Along with the if the message contains \r\ and \n. I have pasted 2 emaples below. I neeed to remove these two from the message body. Can we add something in the same formaula ? instaed of wiriting a new formula
Example1 : "There is no data to be processed in the attached termination
report.\r\n\r\n
Example2 : "Hi @Ganesh, N R\r\n\r\nWe have released blocked mail. Please check your
inbox\r\nafter a while.\r\n\r\n Hi @SOCTeam,\r\n\r\n Kindly add from ganesh@towma.com\r\nunder safe sender list.\r\n\r\n\r\nNote: Please
select ‘Reply All’ when replying to this email so that an available technician
can respond to the request at the earliest.\r\n\r\n\r\nThanks &
pls try this
[
f = Text.Combine( List.Select(
List.Transform(
Text.Split([Column1],"\r\n"),
(x)=> Text.Trim(x)),
(x)=> x <>""),", "),
to = Text.Combine( List.Select(
List.Transform(
Text.Split(f,"["),
(x)=> if Text.Contains(x,"]") = true then Text.Trim( Text.AfterDelimiter(x,"]")) else Text.Trim(x)),
(x)=> x <>""),", ")][to]
Thank you so much for the help ! It worked
Much appriciated. Keep up the good work 🙂
pls try this
Text.Combine( List.Select(
List.Transform(
Text.Split([Column1],"["),
(x)=> if Text.Contains(x,"]") = true then Text.Trim( Text.AfterDelimiter(x,"]")) else Text.Trim(x)),
(x)=> x <>""),", ")
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 |
---|---|
102 | |
101 | |
78 | |
70 | |
63 |
User | Count |
---|---|
141 | |
106 | |
101 | |
85 | |
72 |