Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlikview script

Guys,

I used the below code to group data by month wise,

Screenshot_14.png

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..

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Can you explain what data you're trying to put in table Hours0?

Anonymous
Not applicable
Author

I want to get the worked hours of each employee by month wise

lyeynant
Contributor II
Contributor II

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!