Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
=Count({<IN1={">$(=SHIFTSTARTTIME)"},time((IN1-SHIFTSTARTTIME),'hh:mm:ss')={"<$(=00:10:00)"}>}Empid)
IN1 - Field
Shiftstarttime- field
Empid- primary key field
Empid- Employee id
IN1- in this Employee entry time is given in format '09-Apr-2014 09:35:00'
Shiftstarttime- in this Employee Shift Start time is given in format '09-Apr-2014 08:30:00'
by above expression i want to count no .of employee who are late but are late between 0- 10 min... but error is coming please help
It is generally a good approach to try and pre-calculate as much as possible in the script, to make the front end expressions simpler and more efficient.
In my attached example I have added two fields in the the data model. The first one is called Delay, and represents the interval corresponding to the difference between expected and registered times. The second field is a flag that is true (-1) if the delay is larger than 10 minutes, and false (0) if the delay is smaller than 10 minutes or if the employee is earlier.
This means that in the front-end expression you only need to address the delay flag to find the data rows that has been flagged.
=count({<IsLaterThan10Min={"-1"}>} Empid)
It is generally a good approach to try and pre-calculate as much as possible in the script, to make the front end expressions simpler and more efficient.
In my attached example I have added two fields in the the data model. The first one is called Delay, and represents the interval corresponding to the difference between expected and registered times. The second field is a flag that is true (-1) if the delay is larger than 10 minutes, and false (0) if the delay is smaller than 10 minutes or if the employee is earlier.
This means that in the front-end expression you only need to address the delay flag to find the data rows that has been flagged.
=count({<IsLaterThan10Min={"-1"}>} Empid)
Thank you so much Toni, hats off man...