Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I pull out the Day of Week from a Date File (plus average counts)

I have a data set and I want to pull a couple of different things out.

First of all - I have the month already as a separate field (example:  1,2,3)

I would like to pull out the 'day of week' from a date format loaded as:    mm/dd/yyyy

I have data spread over a year.

I also have 'hour' of incident as a separate field.

I can create a chart that displays the number of incidents for each hour (and each month).

What I want is:

To be able to find out the 'average' number of incidents for each hour (through the dataset), and also by day of week and month

So: in the end, I can have a chart(s) that will show average # of incidents (count) by hour /day/ month.

Any help would be appreciated.

10 Replies
Not applicable
Author

I found this trick to get the day of the week from a field date:

=If( (created_date - WeekStart (created_date, 0,0))  >= 5 , 'WeekEnd','WeekDay')

the calculation result is 0 for Monday, 6 for Sunday !