Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jssonali
Frequent Visitor

Unable to remove keywords from the text body field

Hi, 
Please assist, I want to exclude the rows that have the below keywords from text body field. The text body is text datatype. Currently it removes the rows where the text is written in same way otherwise it shows up if used in Captial or other way.  My data source is from Salesforce. 

"Keywords : please close at your end, have been granted, out of office, Many thanks, much appreciated, thankyou, I have unblocked your account, close the case, resolved, I have successfully logged in., User unblocked. , Update done in Salesforce, .The request is now complete, User is unblocked, Access confirmed.Thank you for your quick resolution, I appreciate it, I now have access, Please close the ticket,  Access is given"

2024-03-20_14h51_28.png2024-03-20_14h52_46.png


Currently I tried to use the Add Conditional Column as below that removes the keywords from text body and returns the rows with data that are useful. 

2024-03-20_14h53_40.png

Is there any other way you could help how to remove these keywords. Looking forward for steps.

7 REPLIES 7
QueryWhiz
Post Patron
Post Patron

Hi @jssonali As a workaround, maybe you can try to test your connection with a 3rd party connector, which pulls data directly from the SF objects API and would let you filter out these records in the tool UI diretly before exporting the data to PBI. I've tried windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the Salesforce connector in the data sources list:

 

SALESFORCE-1.png

 

After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:

 

SALESFORCE-2.png

 

There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor.  Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url. 

 

SELECT_DESTINATION_NEW.png

_AAndrade
Super User
Super User

Show me the code and some examples or share a pbix file with same data to test it, if it's possible to you





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Hi @jssonali,

Did it solve your problem?
Did my message help you in any way? If it did, please mark my message as the solution and give it a "kudo", I'll appreciate it and help me out





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Why?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi,

I did a simple example using the formula below and it's working:

_AAndrade_0-1710928318190.png

M formula:

Table.AddColumn(#"Changed Type", "DeleteRow", each
 if List.Contains({"please close at your end", "have been granted","out of office", "many thanks","much appreciated"  },Text.Lower([Text Body])) 
then "YES" else "NO")

 

For your example, you have to put all your keywords in List.Contains in lower case and it should work correctly.
If you need any help please let me know.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




It doesn't work for me.

It is just displaying me No and still the textbody contains the keywords.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.