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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
borone
New Member

Count row if cell cointains text from another table

Hello,

 

I have two tables.

 

Table 1. contains names that aren't well written.

 

Table 1
Names
Ped
Luc
Dyla
Fiona

 

Table 2. contains names that are well written.

 

Table 2
Name
Pedro
Juan
Dylan
Dylan

 

What I want to achieve is create a calculated column on the first table which shows a count of repitences if table 2 contains part of the first column.

 

Here's my desired result:

 

Table 1
Name Calculated Column
Ped            1
Luc             0
Dyla           2
Fiona         0

 

Thanks a lot.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @borone ,

 

Please try:

Column = SUMX('Table 2', FIND('Table 1'[Names],'Table 2'[Name],,0))

Eyelyn9_0-1672208760157.png

 

Best Regards,
Eyelyn Qin

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @borone ,

 

Please try:

Column = SUMX('Table 2', FIND('Table 1'[Names],'Table 2'[Name],,0))

Eyelyn9_0-1672208760157.png

 

Best Regards,
Eyelyn Qin

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@borone , You can try this, but it can be really costly

 

new column in table 1

countx(filter(Table2, containsstring(Table2[Name], Table1[names]) ), Table2[Name]) +0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors