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

Look up value

I have 2 tables and need to get the result, if len = 10 same value as Column A, if =11 lookup value Column B from Table 2.

Thanks for helping !

 

 Table 1   Table 2  
LenColumn A  Result Column A Column B
101234567890  1234567890 12345678900 9876543210
1112345678900 9876543210 22222222222 8888888888
101111111111 1111111111 33333333333 5555555555
1122222222222 8888888888    
1133333333333 5555555555    
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @drmakberp ,

According to your description, here's my solution.

Create a measure.

Result =
IF (
    MAX ( 'Table 1'[Len] ) = 10,
    MAX ( 'Table 1'[Column A] ),
    LOOKUPVALUE (
        'Table 2'[Column B],
        'Table 2'[Column A], MAX ( 'Table 1'[Column A] )
    )
)

Or create a calculated column in Table 1.

Result column =
IF (
    'Table 1'[Len] = 10,
    'Table 1'[Column A],
    LOOKUPVALUE ( 'Table 2'[Column B], 'Table 2'[Column A], 'Table 1'[Column A] )
)

Get the correct result.

vkalyjmsft_1-1651481367234.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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
v-yanjiang-msft
Community Support
Community Support

Hi @drmakberp ,

According to your description, here's my solution.

Create a measure.

Result =
IF (
    MAX ( 'Table 1'[Len] ) = 10,
    MAX ( 'Table 1'[Column A] ),
    LOOKUPVALUE (
        'Table 2'[Column B],
        'Table 2'[Column A], MAX ( 'Table 1'[Column A] )
    )
)

Or create a calculated column in Table 1.

Result column =
IF (
    'Table 1'[Len] = 10,
    'Table 1'[Column A],
    LOOKUPVALUE ( 'Table 2'[Column B], 'Table 2'[Column A], 'Table 1'[Column A] )
)

Get the correct result.

vkalyjmsft_1-1651481367234.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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