I am currently working on a HR report and I would like to have you help on this issue to caculate the sick leave freqency rate.
I have the table of Employee sick leave with start date and end date.
For the same employee id, it could have multiple lines. for exemple as follows:
|Employee ID||sick leave start date||sick leave end date|
What I would have as result is
for this employee id 123, he/she has 2 times sick leave, because the 1st time then end date is just the day before the 2nd line start date ( so non stop).
Thank you very much.
Solved! Go to Solution.
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!
Thanks for the solution. May I just add one more question related?
How to count in the weekends?
|Employee ID||Sick leave Start date||Sick leave End date|
|123||July 05 2021||July 09 2021|
|123||July 12 2021||July 16 2021|
Actually July 10 and 11 are weekend, so for this employee, his/her sick leave time is once.
Could you please kindly help to sort out this matter?
Thank you in adavance
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.