Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

numbers of hours per week

I have this kind of data 

 

script :

LOAD Id, 
OwnerName, 
Date(AttendanceDay,'DD/MM/YYYY') as AttendanceDay, 
Month(AttendanceDay) as AttendanceMonth,
Year(AttendanceDay) as AttendanceYear,
Week(AttendanceDay) as Week,

Working_hours 

FROM
ar_sheet.xlsx
(ooxml, embedded labels, table is report);

 

i want to extract numbers of hours per week , per month and per year ..

 how i do this 

 

AttendanceDayWorkingHours
11/19/201909:00
11/19/201909:00
11/19/201909:00
11/19/20190:00
11/18/20198:14
11/18/20196:53
11/18/20190:00
11/18/201910:42
11/18/20199:29
11/18/201909:00
11/18/201909:00
11/18/20198:33
11/18/20199:33
11/17/20198:16
11/17/201910:52
11/17/201910:18
11/17/201910:56
11/17/20198:31
11/17/201910:40
11/14/20190:00
11/14/201910:00
11/14/20198:53
11/14/20198:53
11/14/20199:21
11/14/20199:02
11/14/20199:27
11/14/20197:29
11/14/20198:31
11/14/20198:40
11/14/20199:53
11/14/20198:37
11/14/20198:43
11/14/20199:09
11/14/20199:11
11/14/20199:21
11/14/20198:54
11/14/201910:01
11/14/20198:43
11/14/20190:00
11/14/20199:11
11/14/20198:55
11/14/20199:09
11/14/20198:52
11/14/20198:00
11/14/20198:52
11/14/20198:40
11/14/20199:26
11/14/20199:04
11/14/20190:00
11/14/20199:13
11/14/20196:03
11/14/20198:32
11/14/20198:09
11/14/20198:46
11/14/201910:00
11/14/20194:18
11/13/20190:00
11/11/20199:29
11/12/20198:37
11/13/20198:57
11/12/20198:51
11/11/20198:35
11/12/20198:44
11/13/20198:29
11/12/20197:39
11/11/20198:07
11/12/20198:34
11/13/20199:08
11/11/20190:00
11/12/20199:58
11/13/20198:20
11/11/20197:53
11/13/20198:54
11/11/20199:54
11/12/20190:00
11/13/201910:44
11/12/20199:12
11/11/20199:55
11/12/20197:32
11/13/20198:57
11/11/20190:00
11/12/20198:51
11/11/20199:20
11/12/20199:44
11/13/20199:36
11/11/20190:00
11/13/20197:27
11/11/20198:19
11/12/20199:47
11/13/20198:10
11/11/201910:24
11/13/20199:27
11/11/20197:59
11/12/20190:00
11/13/20197:52
11/11/20199:07
11/12/20199:51
11/13/20197:07
11/12/20199:39
11/13/20196:12
11/11/20199:54
11/12/20198:18
11/12/20199:30
11/13/20199:33
11/11/20199:27
11/12/20199:57
11/13/20199:38
11/11/20198:12
11/12/20198:45

 

 

19 Replies
capriconuser
Creator
Creator
Author

why i get same reusult kindly check application and image

 

https://www.dropbox.com/s/ju908jx1ec1pup2/1dash.qvw?dl=0

 

https://www.dropbox.com/s/xaps82qyyo6i0fa/ar.xlsx?dl=0

 

Capture1.JPG

Capture.JPG

 

 

check jan return result 223 which is correct.. when i select week1 in 1st image then why this shows me wrong result

 

@sunny_talwar 

 

sunny_talwar

I am not sure I am able to follow... can you directly attach your qvw here.. I am unable to open dropbox.

capriconuser
Creator
Creator
Author

check it

sunny_talwar

So, why do you think week1 result is wrong? if 41 is not right, what is the right number and why?

capriconuser
Creator
Creator
Author

correct result is 223 

Capture.JPG

@sunny_talwar 

capriconuser
Creator
Creator
Author

when i check excel sheet manually this return me result 

against 2018 year is 2266 and against jan 223 and against week1 is 41.. but here month , year and week result is always same which is 41.. why this is happen ?

sunny_talwar

But in your image I am seeing 223 for month... and 41 for week1? why do you say that month, week are both showing 41?

capriconuser
Creator
Creator
Author

have you check image 1 which i previously posted .. in that image i select week 1 .. and in last image i did not select week .. image is cropped butsome you check on left there is slight cropped.. 

 

when i did not select week 1 image is display correct

 

when i select week 1 result did not show correct

sunny_talwar

I did... but in that image you have made a selection on week1.... if you don't want your month chart to change it's value based on selection in month... then in your expression ignore selection in week field.... 🙂

Brett_Bleess
Former Employee
Former Employee

Hey guys, just wanted to check to see if Sunny's final post got you what you needed?  Basically, he was referring to using Set Analysis in the expression I believe, here is a link just in case you need any help with that:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

If Sunny's post got you what you did need, do not forget to return to the thread and use the Accept as Solution button on his post(s) that helped you get things sorted.  This gives credit to the folks posting possible solutions and it also lets other Community Members know what worked, so be sure to come back and take care of things.  If you are still working on things, leave an update on what you need.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.