The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
248 | |
123 | |
111 | |
78 | |
74 |