Forum Discussion
qwertzuiop
5 years agoAdvocate III
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 /...
- 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])
amitchandak
5 years agoSuper User
qwertzuiop , I think a better idea to merge in power Bi. Select Table 2, merge Table1 and keep the required columns
https://radacad.com/append-vs-merge-in-power-bi-and-power-query