Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi everyone,
This is my first post in the community and i am super excited.
I have a data table as follows
Employee_ID | Manager_ID |
1 | |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 7 |
9 | 8 |
10 | 9 |
9 | 1 |
10 | 2 |
There are cases where some employees has more than 1 reporting manager. For instance Employee 9 reports to two managers 1 & 8. Likewise, Employee 10 has reports to managers 9 & 2.
This is my output when there are no duplicates in the employee ID`s
But, because of duplicate employee ID`s, this is the error I face
Please help me in resolving this error with the data sample data set i`ve shown above.
Really appreaciate Your support!
Thanks in advance!!
Solved! Go to Solution.
Hi,
You should be able to add a first column of this kind :
Hi,
You should be able to add a first column of this kind :
Hi JYA,
Thank you so much!!!
works like a charm.
Much appreciated!!!!!
Hi @phaneendra ,
Whether the advice given by @CNENFRNL has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
From whether technique or business perspective, it's bizarre that one employee is situated at different levels of the same organizational hierarchy. If he/she indeed plays different roles, assign different IDs to him/her. Or, a straightforward solution is to create another funcitonal hierarchy.
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! |
Hi,
Thanks for taking time to investigate!
Let me explain the scenario. An employee was reporting to manager-A, Later in that month for some reasons the employee starts reporting to Manager-B. The system is taking time to update, so at times we get duplicate records. In such cases I face this issue in DAX.
Hope this brings in more light!!
As to me, tt's kind of "slowly changing dimension" case.
Like I said, assign different to the employee and add different records in the Employee dimension table accordingly.
There are certain instrinsic constaints. Your case is inherently restricted. Refer to the official document,
PATH function (DAX) - DAX | Microsoft Docs
“
”
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! |
Hi,
Thank you for your inputs. Yes you are right. But, our system doesnt permit us to alter the employee ID.
However, I was able to find a solution using M-Query which resolved the issue. I am trying to replicate the same in DAX without using PATH function. Since, PATH function doesnt accept duplicates in Employee_ID.
Thanks for your time!!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
60 | |
58 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |