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
Anonymous
Not applicable

How do i merge/get value with 2 condtions if value= value and yearA=>yearB and yearA =< yearC

Hi powerbi experts 

 

How do i merge/get value with condtions:
Get value from table2.columnX


When table1.columnA =table2.columnB

and

table1.ColumnYear => table2.columnyear1

and 

table1.ColumnYear =< table2.columnyear2

 

explanation: column a and b are equal each other, yet table B has this key in several rows

to get the right row of value in table2columnX if have to use my conditions above. 

 

any ideas?

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You can create a new column Table1

//You can sumx inplace of maxx

New column = maxx(filter(Table2, Table1[columnA ] = Table2[columnB] && Table1[ColumnYear ] >= Table2[ColumnYear 1] && Table1[ColumnYear] <= table2[ColumnYear 2]) , Table2[ColumnX])

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
Anonymous
Not applicable

Seems like it's the solution, will test properly if i get the right values from table 2 today. Thanks @amitchandak you'are legend!

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
Top Kudoed Authors