Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!