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
ngct1112
Post Patron
Post Patron

Need Help in Lookup value with Conditions

Hi All, I am trying to lookup value with 2 tables and with a condition. May I seek some advices here without typing the whole list in custom column(As the Original list is much larger)

 

Is there any way I could lookup as below,

if "Table 2"(Size 1) = "Table 1"(Width) ± 10 

AND if "Table 2"(Size 2) = "Table 1"(Height) ± 10

Then "Table 1"(Size) 

 

Table1: (Lookup source)

SizeWidthHeight(w x h)
DL110220110 x 220
C4229324229 x 324
C5162229162 x 229
C6114162114 x 162

 

Table 2 (Lookup destination):

Size1Size2CombineSize Desired Result
117230117 x 230 DL
110227110 x 227 DL
117230117 x 230 DL
113168113 x 168 C6
110220110 x 220 DL
110220110 x 220 DL
229324229 x 324 C4
110220110 x 220 DL
162230162 x 230 C5

 

Appreciated if there is any solution for this!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ngct1112 , Create a new column like this in table 2

 

maxx( filter(Table1,
'Table 2'[Size 1] >= 'Table 1'[Width] -10 && 'Table 2'[Size 1] <= 'Table 1'[Width] +10
&& 'Table 2'[Size 2] >= 'Table 1'[Height] -10 && 'Table 2'[Size 2] <= 'Table 1'[Height] +10 ) , 'Table1'[Size])

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ngct1112 , Create a new column like this in table 2

 

maxx( filter(Table1,
'Table 2'[Size 1] >= 'Table 1'[Width] -10 && 'Table 2'[Size 1] <= 'Table 1'[Width] +10
&& 'Table 2'[Size 2] >= 'Table 1'[Height] -10 && 'Table 2'[Size 2] <= 'Table 1'[Height] +10 ) , 'Table1'[Size])

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

@amitchandak, thanks for your help. It really helps
And side questions, why I can't put your formula on "Add Measure" since I find Parameter is not application to column?
and with this formula, is it possible I could add else "Table 2"(Combine Size")?

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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