Forum Discussion

qwertzuiop's avatar
qwertzuiop
Advocate III
5 years ago
Solved

Add Attributs form another table

Hi dear community   Following problem to solve: I habe two tables (only an overview of data):   Table 1 contains information for which period an employee is assigned to which region / location /...
  • amitchandak's avatar
    amitchandak
    5 years ago

    qwertzuiop , New Columns like this in table 2

     

    Area = maxx(filter(Table1, Table1[ID] =Table2[ID] && Table2[Date] >= Table1[Date_from] && Table2[Date] < = Table1[Date_to]),Table1[Area])

     

    Same way repeat other two

     

    Location = maxx(filter(Table1, Table1[ID] =Table2[ID] && Table2[Date] >= Table1[Date_from] && Table2[Date] < = Table1[Date_to]),Table1[Location])
    Group = maxx(filter(Table1, Table1[ID] =Table2[ID] && Table2[Date] >= Table1[Date_from] && Table2[Date] < = Table1[Date_to]),Table1[Group])