Hi all,
thanks for the help in advance!
I have a dataset with absence data from employees with dates and a code of the day. The code describes the absence type like sick, vacation etc.
i have splitted that into a calculated fied (Daily_absence) to see the absence per working day with that ifelse:
ifelse(
extract(‘WD’, Date) = 2, ‘1_Monday’,
extract(‘WD’, Date) = 3, ‘2_Tuesday’,
extract(‘WD’, Date) = 4, ‘3_Wednesday’,
extract(‘WD’, Date) = 5, ‘4_Thursday’,
extract(‘WD’, Date) = 6, ‘5_Friday’,
extract(‘WD’, Date) = 7, ‘6_Saturday’,
‘’
)
However, by doing so im not able to calculate the percentage out of the total absence + present times as it also splits these automatically.
So what im looking for is how to calculate:
Monday absence / total absence+total present
Tuesday absence / total absence+total present
…
ive tried Sumover but this didnt solved it or im doing something wrong.