Forum Discussion
Sick leave visualization (start and end dates)
- Anonymous4 years ago
Hi Anonymous ,
I didn't use the calendar table.
Firstly, I create a column to get the people on sick leave.
Is on sick leave = IF([startDate]<=TODAY()&&[endDate]>=TODAY(),"Y","N")Then create another column to get the days' remaining who are on sick leave.
days' remaining = IF([Is on sick leave]="Y",DATEDIFF(TODAY(),[endDate],DAY),BLANK())Current day is 7/14/2022, the result is below.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , People on sick leave today
countrows(filter(Table, Table[Start Date] <= Today() && Table[End Date] >= Today()) )
Most Recent leave
Var _Max = maxx(filter(allselected(Table), Table[Start Date] < Today() ), Table[End date]) )
return
maxx(filter(allselected(Table), Table[end Date] =_max ), Table[ID]) )
Also, refer
Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
- Anonymous4 years agoNot applicable
This worked perfectly, even when I visualize it as a table, but with a column showing "1" in every row. Thanks amitchandak
countrows(filter(Table, Table[Start Date] <= Today() && Table[End Date] >= Today()) )About the second code I'm having problems to completely understand it. Can u please explain me how does it work?