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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ColinCH
Regular Visitor

Compare 2 columns from 2 tables

Hello

 

I'm looking for a solution in DAX for a calculated column.

My problem is that I need to compare two columns of two tables with each other. Both tables have different inputs and only a few rows match each other.

 

For example: I have two tables A and B. Both have entries with dates and numbers.

I need to check the entries of both and print an output in the calculated column.

 

Table A:

 

DateNumber
12.01.20221111
12.01.20223333
23.02.20223333
23.02.20221111

 

Table B:

DateNumberCalculated column (Output)
23.02.20221111Found in table A
28.01.20221111Not found in table A
23.02.20222222

Not found in table A

12.01.20221111

Found in table A

 

 

How would I do this?

 

Thank you! Sincerely

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @ColinCH ,

you can try this

mangaus1111_0-1669725429056.png

Column = 
IF(
    ISBLANK(
            LOOKUPVALUE('Table A'[Number],
                        'Table A'[Date],'Table B'[Date],
                        'Table A'[Number],'Table B'[Number]
                       )
           ),
"Not found in table A",
"Found in table A"
)

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

1 REPLY 1
mangaus1111
Solution Sage
Solution Sage

Hi @ColinCH ,

you can try this

mangaus1111_0-1669725429056.png

Column = 
IF(
    ISBLANK(
            LOOKUPVALUE('Table A'[Number],
                        'Table A'[Date],'Table B'[Date],
                        'Table A'[Number],'Table B'[Number]
                       )
           ),
"Not found in table A",
"Found in table A"
)

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

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors