Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey Guys!
I hope you can help me out. I have to compare 2 Lists in 2 Tables (dosen't matter if this happens in DAX or M).
The goal is to create a new column "EmployeeCanHelp" in the Table "Projects".
Employee's should be added to the column if they have at least 1 skill. Their can be more then one Employee, so this have to be a new List
Example:
Employee1, John Doe has the skills: "Skill1", "Skill3", "Skill4". He is responsible for ProjectID "1" and "2". He could help out with ProjectId "3", "4" and "5"
ProjectID "3" skills are "Skill2" and "Skill5", so he couldn't help out their but in ProjectId "4" and "5"
Solution:
Table "Projects"
ProjectID | ProjectName | ProjectSkillsNeeded | EmployeeID | EmployeeCanHelp |
1 | Project1 | Skill1, Skill2, Skill5 | 1 | Maria Doe |
2 | Project2 | Skill5, Skill4, Skill1, Skill2 | 1 | Maria Doe, Albert Albertson |
3 | Project3 | Skill2, Skill5 | 2 | None |
4 | Project4 | Skill2, Skill4 | 3 | John Doe, Maria Doe |
5 | Project5 | Skill5, Skill2, Skill4 | 2 | John Doe, Albert Albertson |
I have following data:
Table: "Employee"
EmployeeId | EmployeeName | EmployeeSkills |
1 | John Doe | Skill1, Skills3, Skill4 |
2 | Maria Doe | Skill4, Skill2, Skill5 |
3 | Albert Albertson | Skill4, Skill3 |
Table: "Projects"
ProjectID | ProjectName | ProjectSkillsNeeded | EmployeeID |
1 | Project1 | Skill1, Skill2, Skill5 | 1 |
2 | Project2 | Skill5, Skill4, Skill1, Skill2 | 1 |
3 | Project3 | Skill2, Skill5 | 2 |
4 | Project4 | Skill2, Skill4 | 3 |
5 | Project5 | Skill5, Skill2, Skill4 | 2 |
I hope you can help me out, because I run out of ideas and don't get it to work.
Already tried this one out: Solved: How to transform & compare 2 columns having multip... - Microsoft Power BI Community but I couldn't get it to work.
Thank you so much in advance and I wish you some wonderfull days.
Alex
Solved! Go to Solution.
Tricky solution with PQ,
Check your mock-up. For project4 (needs 2,4) in the charge of empl3 (3,4), only empl2 possesses skill2; why empl3 is chosen? For project5, I didn't see any necessity of extra aide since empl2 possesses all skills needed.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Tricky solution with PQ,
Check your mock-up. For project4 (needs 2,4) in the charge of empl3 (3,4), only empl2 possesses skill2; why empl3 is chosen? For project5, I didn't see any necessity of extra aide since empl2 possesses all skills needed.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
DAX solution is even trickier and fairly complex. For fun only (dataset is tweaked for verification),
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
It works perfect. Thank you so much!
Thank you for the reply, I will test it after the reply.
For Project4:
For the EmployeeCanHelp it's required that at least one skill matches.
For Project5:
We need a list of employees that the department can choose one in the list, because they maybe dont want to assign a specific person to that project.
User | Count |
---|---|
94 | |
78 | |
73 | |
64 | |
60 |
User | Count |
---|---|
106 | |
97 | |
76 | |
63 | |
61 |