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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.