Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Please find the below images
Selected Few dates but the sum is showing wrong.
Regards,
Keerthi KS
Hello Keerthi,
Based on my understanding, for dimensions RegularizedStatus & EmployeeAttendanceLogDate there are two records with same value of LogInTime, RegInTime, LogOutTime & RegOutTime etc. (refer attached excel sheet).
As as workaround, I have used DISTINCT in aggregation function.
Hope this will be helpful.
Regards!
Rahul
Hi..Keerthi,
You can try this, it will help you.
=Interval(Sum(SubField(duration_txt,' ',-1)))
what is the expected output ?
39:37:00
Hello Keerthi,
Please refer below given expression:
=Interval(Sum(Num(EmpAttendenceLogTime)), 'hh:mm:ss')
Also review the attached sample application.
Hope this will be helpful.
Regards!
Rahul
Just do =Time(Sum(EmpAttendenceLogTime))
EmpAttendanceLogs:
LOAD
Uniqueid as EmpAttedenceLogID,
EmployeeUniqueId as EmpLogUniqueid,
Date(Floor(Num(AttendenceDate))) as EmpAttendenceLogDate,
AttendenceTime as EmpAttendenceLogTime,
attendence as EmpAttendenceLogDateTime,
IsRegularized
FROM
[..\10_data_sources\EmpAttendanceLogs.qvd]
(qvd);
Left Join (EmpAttendance)
Load
EmpLogUniqueid,
EmpAttendenceLogDate,
RegularizedStatus,
Date(Min(EmpAttendenceLogTime),'hh:mm:ss') as RegInTime,
Date(Max(EmpAttendenceLogTime),'hh:mm:ss') as RegOutTime
Resident EmpAttendance where IsRegularized=1
Group by EmpLogUniqueid,EmpAttendenceLogDate,RegularizedStatus;
Left Join (EmpAttendance)
Load
EmpLogUniqueid,
EmpAttendenceLogDate,
RegularizedStatus,
Date(Min(EmpAttendenceLogTime),'hh:mm:ss') as LogInTime,
Date(Max(EmpAttendenceLogTime),'hh:mm:ss') as LogOutTime
Resident EmpAttendance where IsRegularized=0
Group by EmpLogUniqueid,EmpAttendenceLogDate,RegularizedStatus;
My data model is something like this.
When i check for Sum with EmpAttendenceLogTime. It was showing correctly.
When i sum for RegInTime its showing double.
Please let me know if there is any mistake.
Hello Keerthi,
To further analyze this issue, could you please share the application with sample data? This will help us to provide your expected result.
Regards!
Rahul
Hi Rahul,
Please find the attached application.
Regards,
Keerthi KS
Hello Keerthi,
Based on my understanding, for dimensions RegularizedStatus & EmployeeAttendanceLogDate there are two records with same value of LogInTime, RegInTime, LogOutTime & RegOutTime etc. (refer attached excel sheet).
As as workaround, I have used DISTINCT in aggregation function.
Hope this will be helpful.
Regards!
Rahul