Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys,
I used the below code to group data by month wise,
But as the data contains multiple rows or values for a single date, I couldn't sum all the values of a month. Plz help me guys, attched my sample excel file..
Can you explain what data you're trying to put in table Hours0?
I want to get the worked hours of each employee by month wise
Hi Siva,
You need to change your script as -
Source:
LOAD ProjectID,
EmployeeID,
sheet_date,
Billable,
worked_hours,
Month(sheet_date)&Year(sheet_date) as MonthYear
From ...qvd (qvd);
Store Source Into ... Source.qvd ;
Drop Table Source;
Hours:
LOAD EmployeeID&MonthYear as key,
EmployeeID,
MonthYear,
Round(Sum(worked_hours)) as Monthly_WorkHours
From Source.qvd (qvd)
Group by EmployeeID,MonthYear ;
Left Join
LOAD EmployeeID&MonthYear as key,
Round(Sum(worked_hours)) as Monthly_BillableWorkHours
From Source.qvd (qvd)
Where Billable='true' ;
I didn't saw field billable in your xls, believe you have it in your DB.
Also you can use the first table and make the calculation in UI using set analysis.
Good luck!