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.
Hello,
I would like to search for a single text string in a cell that contains a long URL and replace that entire URL with a custom value/string.
For example this URL: /Login?ReturnUrl=https://www.company.org/support/articles-and-how-tos/10-steps-for-planning-a-successful-webinar. I would like to search the entire table for URL's containing the text string "articles" then replace that cell with the word "articles" only. The cells that do not contain "articles" to be replaced with "none." How can I do this?
Also, this URL: /posts/how-can-cloud-storage-benefit-my-company-http://blog.company.org/posts/how-can-cloud-storage-benefit-my-company, I would like to search the entire table for URL's containing the text string "blog" then replace that cell with the word "blog" only.
Solved! Go to Solution.
Hi,
You may download the PBI file from here.
Hope this helps.
Hi,
In a calculated column formula, you may use the IF() and SEARCH() functions.
@Ashish_Mathur can you please provide an example of what that formula would look like?
Hi,
You may download the PBI file from here.
Hope this helps.
You are welcome.
Check the documentation
https://docs.microsoft.com/en-us/powerquery-m/table-replacevalue
You will notice that the replacer is a function. This means you can use whatever custom function you want in that step, including the checks that you describe. You could even have a reference table with keywords that should be searched for, and that should replace the entire cell contents if found.
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 |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |