Forum Discussion

montibellin's avatar
montibellin
Icon for Helper I rankHelper I
5 years ago
Solved

DAX add column based on comparison between two tables

Hi Guys,

 

starting from two tables like

Table 1
Col ACol B 
Ross297
Brian350
Catia125
Danny40  

 

Table 2
Col ACol B
0100
1200
2300
3400

 

Table 1 must became

Table 1
Col ACol B Col C
Ross2972
Brian3502
Catia1251
Danny400

 

where 'Tabl 1'[Col C] is equal to max('Table 2'[Col A]) based on the comparison 'Table 1'[Col B]<'Table 2'[Col B]