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
GillesDesbois
Regular Visitor

Comparison of 2 columns with approximately the same values

hello
I have 2 tables

table 1 column 1 with all values
table 2 column 1 with same value as table 1 column 1 but not all the value

 

I want to have a new column in the table 1 which tell me if the value in column 1 is also present in table 2 and this, value per value

ex :

 

table 1 column 1table 1 column 2 table 2 column 1
apresent a
bnot present f
cnot present  
dnot present  
enot present  
fpresent  

 

Hope I'm clear
if someone has already found this issue and solved it, please help me

Gilles

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @GillesDesbois 

Try this for the new calculated column in 'table 1':

 

column 2 =
IF (
    COUNTROWS ( FILTER ( 'table 2', 'table 2'[column 1] = 'table 1'[column 1] ) ) > 0,
    "present",
    "not present"
)

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @GillesDesbois 

Try this for the new calculated column in 'table 1':

 

column 2 =
IF (
    COUNTROWS ( FILTER ( 'table 2', 'table 2'[column 1] = 'table 1'[column 1] ) ) > 0,
    "present",
    "not present"
)

 

hello

sorry for my late answer

yes it works

a great thank for your help

Gilles

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.