Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have Employee hierarchy data as follows,
Vice-President | Director | Manager | Employee | date |
Adam | Jack | Fernandez | Steve | 20/11/2019 |
Alia | Samson | Mikky | Steve | 13/12/2019 |
Ben | William | Mikky | Steve | 15/2/2020 |
Stokes | Jack | Mikky | Steve | 27/03/2020 |
Windy | William | Fernandez | Steve | 15/07/2020 |
Carl | Samson | Fernandez | Steve | 20/12/2020 |
Marx | William | Mikky | Steve | 1/1/2021 |
Shelly | Samson | Fernandez | Steve | 12/4/2021 |
Wiong | Jack | Mikky | Steve | 8/8/2021 |
The Date column is the day when a person has becom Vice president of Steve.
I have a employee named Steve for whom the Vice president changes with time. I want to show the latest Vice president of Steve i.e., Wiong.
I tried to calculate max date to get current Vice-president for Steve,
but when I'm dragging Vice-President column and Employee column to visual I'm getting all Vice-Presidents of Steve and dates.
Please help me to do it.
Thanks,
AshDil.
Solved! Go to Solution.
Hi @AshDil ,
If you want to show current Vice president based on the lastest Date for each employee ,you could try:
Measure=
var _date=MAXX(FILTER(ALL('Table'),[Employee]=MAX('Table'[Employee])),[date])
return CALCULATE(MAX('Table'[Vice-President]),ALLEXCEPT('Table','Table'[Employee]),'Table'[date]=_date)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AshDil ,
If you want to show current Vice president based on the lastest Date for each employee ,you could try:
Measure=
var _date=MAXX(FILTER(ALL('Table'),[Employee]=MAX('Table'[Employee])),[date])
return CALCULATE(MAX('Table'[Vice-President]),ALLEXCEPT('Table','Table'[Employee]),'Table'[date]=_date)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |