Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Paulina
Contributor
Contributor

How to count number of day grupped by Year-month, district, department where first transaction time is >8:30

Hello,

Could You help me with how to script aggr function?

I try to count amount of day in each month and in each district and department where first transaction in day started after 8:30 (where min (Time_transaction)>8:30) .

What I need in result:

District|Department|Year-Month|Count(Day)|Count(day where min (Time_transaction)>8:30)|Count(Time_transaction)

Diastric A|Office 1|2020-01|31|10|1500

District B|Office 1|2020-01|31|5|3153

District B|Office 2|2020-01|31|7|789

 

This is sample of my data:

id|Day|District|Department|Time_transaction

1|2020.01.01|District A|Office1|8:05

2|2020.01.01|District A|Office 1|8:10

......

50|2020.01.01|District B|Office 1|8:45

51|2020.01.01|District B|Office 1|8:55

52|2020.01.01|District B|Office 1|9:00

Thanks

Paulina

 

Labels (1)
0 Replies