Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
yoganantha321
Creator II
Creator II

sum of hours

Guys,

When I sum worked hours of an employee for a particular month and year, I'm not getting the expected result.

Code I have used,

Hours0:

LOAD EmployeeID,

  ProjectID,

  ReleiveStatus,

  sheet_date as Sheetdate,

     worked_hours as WorkHours 

Resident ResourceTimesheet;

Fact:

load Date(floor(Sheetdate),'MM/DD/YYYY') as Timesheet,

  Year(Sheetdate) & '|' & Month(Sheetdate)& '|' & Date(Sheetdate) as Sheetdate,

  EmployeeID,

  ReleiveStatus,

  If(len(WorkHours)>0,WorkHours,0) AS WorkHour

Resident Hours0;

Plz suggest a way to achieve this.

Thanks in advance.

I have attached the sample of data along with this

3 Replies
sunny_talwar

Attached files seems to be corrupt... can you reattach may be

yoganantha321
Creator II
Creator II
Author

Sunny,

I have attached the new file excel can you download it

jtay
Contributor III
Contributor III

The data in your spreadsheet is showing as text.  Not sure if that's a copy/paste issue or if it's a data issue.  You may want to try formatting WorkHour:    Num#(WorkHour,'0.0') as WorkHour