Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

term sum or count

Hello to all

I am a beginner in QlikView, I try to make a qw report is based on a path of personal drive (time of entry, time out, areas, etc..).

I am looking for a formula (expression) that will allow me to count the number of times an individual is late from 7am 45

I can retrieve all day from late this expression:

=if((CalendarWeekDay = 'Monday' or  CalendarWeekDay =' Tuesday ' or CalendarWeekDay =' Wednesday ' or  CalendarWeekDay =' Thursday ' or CalendarWeekDay =' Friday')) and min((hours),1)>=maketime(7,45),min((hours),1))


nameServiceDateSemainemonthdayHours Arrival
agent 5INFORMATIQUE04/02/20146FebruaryTuesday 07:56:08
agent 7INFORMATIQUE04/02/20146FebruaryTuesday 07:52:20
agent 1INFORMATIQUE03/02/20146FebruaryMonday08:37:58
agent 1INFORMATIQUE04/02/20146FebruaryTuesday 08:15:14
agent 1INFORMATIQUE05/02/20146FebruaryWednesday08:38:14
agent 1INFORMATIQUE06/02/20146FebruaryThursday 08:20:36
agent 4INFORMATIQUE03/02/20146FebruaryMonday07:45:54
agent 4INFORMATIQUE07/02/20146FebruaryFriday07:50:46
agent 6INFORMATIQUE05/02/20146FebruaryWednesday13:23:36
agent 6INFORMATIQUE07/02/20146FebruaryFriday15:38:20
agent 2INFORMATIQUE03/02/20146FebruaryMonday07:49:18
agent 2INFORMATIQUE04/02/20146FebruaryTuesday 07:49:12
agent 2INFORMATIQUE05/02/20146FebruaryWednesday08:03:18
agent 2INFORMATIQUE06/02/20146FebruaryThursday 08:08:40
agent 2INFORMATIQUE07/02/20146FebruaryFriday07:58:28
agent 3INFORMATIQUE04/02/20146FebruaryTuesday 08:00:26

Now my problem is how can we have the sum of all minimum an agent or counting to get a result like that.


agent 1 = 4

agent 2 = 5

agent 3 = 1

agent 4 = 2

agent 5 = 1

agent 6 = 2

agent 7 = 1

13 Replies
Not applicable
Author

if I create a simple table with user id how I will use the term count
count ({$ <FLAGLATE = {1}} FLAGMINHOURS)
maxgro
MVP
MVP

add a tablebox using Table and verify if the records you wants are flagged

if yes build the chart using the expression in my attachment (modified because of different source data);

dimension     idusager

expression     count({$ <FLAGLATE={1},FLAGMINHOURS={1}>} DISTINCT date)

Not applicable
Author

thank you it works well

maxgro
MVP
MVP

Please close this discussion by giving Correct and Helpful answers to the posts which are useful for you.  It helps others in finding answers for similar scenarios.