Hello,
I've got a challenge at work to implement a cube, showing the movement of employees.
The movement is defined like this:
If someone changes from one line manager to the other, the old line manager has one leaver and the new line manager has one starter.
This doesn't sound spectacular, but here's the problem.
We've got the standard parent-child employee hierarchy dimension and when you drilldown to the level of the old line manager the cube should show the measure leaver = 1.
However, when you drill up in the hierarchy and reach a point, where the old line manager and the new line manager are both subordinates of yet another line manager, he should see starter = 0 and leaver = 0.
The fact data might look like this:
NewLineManager[tab]OldLineManager[tab]Employee[tab]ChangeDate
A[tab][tab][tab][tab][tab][tab][tab]B[tab][tab][tab][tab][tab][tab]Z[tab][tab][tab][tab]01.01.2008
The new simplified LineManagerHierarchy parent-child data look like this:
Parent[tab][tab]Child
C[tab][tab][tab][tab]A
C[tab][tab][tab][tab]B
A[tab][tab][tab][tab]Z
The cube must display this situation as follows:
LineManagerLevel 1[tab]LineManagerLevel 2[tab]Starter[tab]Leaver
C[tab][tab][tab][tab][tab][tab][tab][tab](Total)[tab][tab][tab][tab][tab]0[tab][tab][tab][tab]0
C[tab][tab][tab][tab][tab][tab][tab][tab]A[tab][tab][tab][tab][tab][tab][tab]1[tab][tab][tab][tab]0
C[tab][tab][tab][tab][tab][tab][tab][tab]B[tab][tab][tab][tab][tab][tab][tab]0[tab][tab][tab][tab]1
An idea to solve this problem is a calculated measure in which I would check if the current node in the LineManagerHierarchy is a parent/ascendant of both line managers in the fact table.
As I’m not quite familiar with MDX I don’t know, whether this is even possible.
Any suggestions are highly welcome!
Greetings Bjoern
I've got a challenge at work to implement a cube, showing the movement of employees.
The movement is defined like this:
If someone changes from one line manager to the other, the old line manager has one leaver and the new line manager has one starter.
This doesn't sound spectacular, but here's the problem.
We've got the standard parent-child employee hierarchy dimension and when you drilldown to the level of the old line manager the cube should show the measure leaver = 1.
However, when you drill up in the hierarchy and reach a point, where the old line manager and the new line manager are both subordinates of yet another line manager, he should see starter = 0 and leaver = 0.
The fact data might look like this:
NewLineManager[tab]OldLineManager[tab]Employee[tab]ChangeDate
A[tab][tab][tab][tab][tab][tab][tab]B[tab][tab][tab][tab][tab][tab]Z[tab][tab][tab][tab]01.01.2008
The new simplified LineManagerHierarchy parent-child data look like this:
Parent[tab][tab]Child
C[tab][tab][tab][tab]A
C[tab][tab][tab][tab]B
A[tab][tab][tab][tab]Z
The cube must display this situation as follows:
LineManagerLevel 1[tab]LineManagerLevel 2[tab]Starter[tab]Leaver
C[tab][tab][tab][tab][tab][tab][tab][tab](Total)[tab][tab][tab][tab][tab]0[tab][tab][tab][tab]0
C[tab][tab][tab][tab][tab][tab][tab][tab]A[tab][tab][tab][tab][tab][tab][tab]1[tab][tab][tab][tab]0
C[tab][tab][tab][tab][tab][tab][tab][tab]B[tab][tab][tab][tab][tab][tab][tab]0[tab][tab][tab][tab]1
An idea to solve this problem is a calculated measure in which I would check if the current node in the LineManagerHierarchy is a parent/ascendant of both line managers in the fact table.
As I’m not quite familiar with MDX I don’t know, whether this is even possible.
Any suggestions are highly welcome!
Greetings Bjoern