Forum Discussion
Calculate sick report frequency
Hi,
I believe I've written a calc that does what you're looking for:
- Anonymous7 years agoNot applicable
Hi bhpage,
Thanks for your response.
If I understand correctly the formula compares the hourcodekey of the current rowcontext with the hourcodekey of the preceeding rowcontext. If the hourcodekey in the current rowcontext is 160 and the hourcodekey in the preceeding rowcontext is not 160 than that is the day the employee called in sick for the first time.
Unfortunately the formula doesn't work with my real-life version of the data. The only thing different is that there are multiple employees in the real table who all have time registration data on the same dates. The error message reads "A table of multiple values was supplied where a single value was expected".
Can you solve this problem as well?
Rg. Erwin
- Anonymous7 years agoNot applicable
Can you provide an example of a customer like this?
- Anonymous6 years agoNot applicable
Thanks a lot! I get the following error when I try to apply this calculation in a similar dataset with multiple similar dates:
A table of multiple values was supplied where a single value was expected.Dataset example:
Date Start time Hourcodekey employeekey Sick occurence should be: 1-6-2020 09:00 103 1201 2-6-2020 09:00 103 1201 3-6-2020 09:00 160 1205 1 4-6-2020 09:00 160 1205 4-6-2020 09:00 103 1201 4-6-2020 15:00 103 1201 5-6-2020 09:00 103 1201 6-6-2020 09:00 160 1201 1 6-6-2020 09:00 160 1205 1 7-6-2020 09:00 103 1201 8-6-2020 09:00 103 1201 8-6-2020 09:00 160 1205 1 8-6-2020 09:00 160 1205 9-6-2020 09:00 103 1201 10-6-2020 09:00 103 1201 11-6-2020 09:00 103 1201 12-6-2020 09:00 160 1201 1 12-6-2020 15:00 160 1201 12-6-2020 09:00 103 1205 14-6-2020 09:00 103 1201 15-6-2020 09:00 103 1201 Hope someone can help us out