Forum Discussion
A_Vijgo
2 years agoNew Member
Lookup from same table
Hi I am having trouble with looking up for data from the same table. What i am trying to achieve is to capture line manager hierarachy that rolls up to CEO for that particular month (It is a mont...
- 2 years ago
pls try this
LM1 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[Line Manager ID])),'Table'[Line Manager ID]) LM2 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[LM1])),'Table'[Line Manager ID]) LM3 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[LM2])),'Table'[Line Manager ID])pls see the attachment below
ryan_mayu
2 years agoSuper User
sorry, still confused about the explaination. In your sample data ,what's the exactly result we should have?
A_Vijgo
2 years agoNew Member
Hi
This is the table, columns LM1, LM2 and LM3 is the result columns i need to capture.
| EID | Name | Line Manager ID | Month | LM 1 | LM 2 | LM 3 |
| 1036 | John | 2673 | Oct-23 | 2560 | 2451 | 2981 |
| 2673 | William | 2560 | Oct-23 | 2451 | 2981 | |
| 2560 | Seth | 2451 | Oct-23 | 2981 | ||
| 2451 | Caroline | 2981 | Oct-23 |
- ryan_mayu2 years agoSuper User
pls try this
LM1 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[Line Manager ID])),'Table'[Line Manager ID]) LM2 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[LM1])),'Table'[Line Manager ID]) LM3 = MAXX(FILTER('Table','Table'[EID]=EARLIER('Table'[LM2])),'Table'[Line Manager ID])pls see the attachment below