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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Housden996
Helper II
Helper II

How to format a Dynamic Contains String to Exclude

Hi

 

My client wants to exclude emails from a list based on key phrases being stored in a sharepoint list, is this possible. 
I am thinking something along the lines of this but there isnt a way to join the two tables are the domain for the emails are all unique:

Exclude = IF(CONTAINSSTRING('Clients and Emails'[Contact Email], 'Exclude'[Exclude]),1,0)
 
Thanks in advance!
1 ACCEPTED SOLUTION

@Housden996 Thanks for sharing this sample input data. So, here I took the sample for  EmailTable and ExcludeTable like this:

Tahreem24_0-1714403733233.png

Tahreem24_1-1714403748814.png

 

Step 1: Go to Transform Data option, Select EmailTable, then select "Email" column and right click and choose "Duplicate Column"

Tahreem24_2-1714403841862.png


Step 2: Then right click on this above duplicate column and follow the below step for splitting

Tahreem24_3-1714403918061.pngTahreem24_4-1714403941959.png


Step 3: Remove the extra column after splitting

Tahreem24_5-1714404016511.png

 

 

 

 

Step 4: Click on Merge as New query option

Tahreem24_6-1714404078243.png



Step 5: Do the below setting

Tahreem24_7-1714404223745.png


Step 6: Then save and close.
Step 7: On Table visua;, take ID and email from this Merge1 table

Tahreem24_8-1714404389740.png

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

5 REPLIES 5
Tahreem24
Super User
Super User

@Housden996 , It would be great if you can share the sample input data along with expected output in order to understand your query.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks for your response. 

 

So the intial data table would look along the lines of:

Housden996_0-1714402596388.png

Then there would be another data source the client has access too where they can add records along the line of:

Housden996_1-1714402640937.png

I would then need some dax to exclude any of the emails which contain said phrases within the table above to return a table such as bellow:

Housden996_2-1714402688966.png

 

 

@Housden996 Thanks for sharing this sample input data. So, here I took the sample for  EmailTable and ExcludeTable like this:

Tahreem24_0-1714403733233.png

Tahreem24_1-1714403748814.png

 

Step 1: Go to Transform Data option, Select EmailTable, then select "Email" column and right click and choose "Duplicate Column"

Tahreem24_2-1714403841862.png


Step 2: Then right click on this above duplicate column and follow the below step for splitting

Tahreem24_3-1714403918061.pngTahreem24_4-1714403941959.png


Step 3: Remove the extra column after splitting

Tahreem24_5-1714404016511.png

 

 

 

 

Step 4: Click on Merge as New query option

Tahreem24_6-1714404078243.png



Step 5: Do the below setting

Tahreem24_7-1714404223745.png


Step 6: Then save and close.
Step 7: On Table visua;, take ID and email from this Merge1 table

Tahreem24_8-1714404389740.png

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thank you this is the same solution I have come up with as well which will work for most instances.

@Housden996 , You're welcome! 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.