Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, I have tow table like this related by idEmp. I want to create a column in the first table with the info about the principal activity of the employee, in this case the activity the empolyee gets most of his income.
idEmp * (Pk) | Name | Principal Activity ????? |
EMP00001 | John Cena | Chef |
EMP00002 | Bon Jovi | Waiter |
idEmp * | Category | Salary |
EMP00001 | Chef | 1000 |
EMP00001 | Waiter | 500 |
EMP00001 | Kitchen boy | 200 |
EMP00002 | Waiter | 2000 |
EMP00002 | Kitchen | 700 |
Thank you in advance!!
Solved! Go to Solution.
@94veiga , Better to have a rank column in table2
New column in Table 2
Rank = rankx(filter(Table2, [idemployee] =earlier([[idemployee])),[Salary])
New column in table 1 =
new column = maxx(filter(Table2, Table2[idemployee] = Table1[Idemployee], Table2[Rank]=1),[Category])
@94veiga , Better to have a rank column in table2
New column in Table 2
Rank = rankx(filter(Table2, [idemployee] =earlier([[idemployee])),[Salary])
New column in table 1 =
new column = maxx(filter(Table2, Table2[idemployee] = Table1[Idemployee], Table2[Rank]=1),[Category])
Hello, thanks for your support. The first DAX worked perfectly but I'm having problems with the second one.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |