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

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.

Reply
Anonymous
Not applicable

Filter out multiple values from a list

Hello,

 

I have a table that containts a list of all contacts that I have exported from our CRM (salesforce.com) that I want to cleanup.

I am looking to filter the list to remove all contacts that have a an email from a public domain (gmail, hotmail, yahoo, ect.) and keep only the ones with company emails.

 

I don't want to use a slicer and go trought the list of emails manually as there are over 15,000 contacts in that list.

I managed to exclude one domain by using the page level/report level filters and keeping only the records for which the email adress did no contain "@gmail" but I can only do it for one so I am left with all the other public domains.

I also tried creating a new column by splitting the email column using the "@" as delimiter and then using a slicer. This reduced the size of the list but there are still over 500 different domains to pick from so this option is far from ideal.

 

Does anyone have a idea on how to filter out/exclude multiple values at a time?

 

Thanks in advance,

Phil

1 ACCEPTED SOLUTION

Hi @Anonymous ,

As I said, you can add public domain table with domain text which you want to exclude.

15.png

Then add a calculated column to contact table to compare current row content with public domain table list.

Is Public = 
COUNTROWS (
    FILTER (
        ALL ( 'Pubich Domain' ),
        SEARCH( 'Pubich Domain'[Domain], [Email], 1, -1 ) > 0
    )
) > 0

16.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

6 REPLIES 6
QueryWhiz
Helper V
Helper V

Hi. As a workaround, maybe you can try to test your connection with a 3rd party connector instead of manually exporting data from SF. I currently use Windsor.ai and I can directly pull contacts data from SF and I can even exclude some values directly on Windsor interface using the filters option. 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

v-shex-msft
Community Support
Community Support

HI @Anonymous ,
Maybe you can consider to add a public/company domain list to your report, then filter records based on public/company domain list.
In addition, I'd like some sample data to help us clarify your data structure for test and coding formula.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft,

 

Please find a short example of my data below, note that contact information is fake and not valid.

Table Name: Contact

First NameLast NameEmailPhonejob titleCompany
JohnDoejdoe@sony.com555-555-5555Director of MarketingSony
JennyBrooksjennyb@samsung.com   
PeterParkerpeter@gmail.com555-555-5555ConsultantPeter Inc.
SusanJamessj101@hotmail.com555-555-5555Student 
KimSullivanKim.Sullivan@hp.com AnalystHP
BrendaWozniakWozniakB@lexus.com555-555-5555 Lexus
ScottWadeScott.wade@ups.com555-555-5555VP Customer servicesUPS
NataliahernandezNatCat@outlook.com555-555-5555  
AlexRawlingsAlexRaw@aol Customer support agentFord
PatrickKanepatrick.kane@verizon.comCX DirectorVerizon

 

As with any other contact database not all fields are populated with prevents me from filtering on other values like company or title. The only required field to enter a new record in the table was an email address so filtering on the email seems like the only way to properly clean that database.

 

Ultimately, I want to get a table with excluding all record with a public email

Also, since in some rare occasions some public email might be relevant if other criterias are meet, I would prefer to apply the filter at the report level and not at the initial query level when importing the data from salesforce.com

 

I hope this can help you better understand what I am trying to get to and define the right query/measure

Hi @Anonymous ,

As I said, you can add public domain table with domain text which you want to exclude.

15.png

Then add a calculated column to contact table to compare current row content with public domain table list.

Is Public = 
COUNTROWS (
    FILTER (
        ALL ( 'Pubich Domain' ),
        SEARCH( 'Pubich Domain'[Domain], [Email], 1, -1 ) > 0
    )
) > 0

16.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

why dont u apply filter in query editor where email domain = your company...n ignore all other...

Anonymous
Not applicable

Hello Reddy_powerBi

 

My list contains customer contacts so they all have different domains so what you propose is not a viable option in that case

 

Thanks,

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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