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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

WEEKLY

Hey all,

I need to know can i calculate a week on a set analysis

My problem is that i need to show a Gauge-chart that shows me a how the employee moves in term of his target (weekly target)

Ex :

employee has to do 5 Visits Per week and 35 callss per week either as a target

i want to calculate number on visits weekly to see if the employee reach their target

any help >?

1 Solution

Accepted Solutions
Anonymous
Not applicable

To separate date from time, use date(floor()) function to get the date, and time() function to get time.  See for example
=date(floor(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT')))
=time(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT'))

You need to replace '6/1/2014 6:51:25PM' with the actual field name (I assume "Interaction")

To get the "weekly number of interaction" just create a chart (table) with dimension Week and expression  count(Interaction)

View solution in original post

10 Replies
robert_mika
Master III
Master III

Could you post your data or app?

Anonymous
Not applicable

If you have Week as one of your date attributes, it shouldn't be a problem.  Not sure why you mention set analysis here - you may need or not need it depending on the specific situation.

Not applicable

Hey Mario,

Is it a static week or a rolling 7day calculation you like to do?

Ex

count( {<Week= {$(=Max(Week)-1)}>} Visits ) shows the visits for previous week and should be able to just use to a chart with the employees as dimension. 

mario-sarkis
Creator II
Creator II
Author

Hi Robert ,

First i have a field look like this

Interaction:

6/1/2014 6:51:25PM

7/31/2014 7:16:15PM

12/3/2014 6:15:20PM

how can separate the date from time

second i need to calculate the weekly number of interaction.

Thank you


Anonymous
Not applicable

To separate date from time, use date(floor()) function to get the date, and time() function to get time.  See for example
=date(floor(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT')))
=time(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT'))

You need to replace '6/1/2014 6:51:25PM' with the actual field name (I assume "Interaction")

To get the "weekly number of interaction" just create a chart (table) with dimension Week and expression  count(Interaction)

mario-sarkis
Creator II
Creator II
Author

can i write it like this in the script ?

Anonymous
Not applicable

Almost:

date(floor(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT'))) as Date

time(timestamp#('6/1/2014 6:51:25PM','M/D/YYYY h:mm:ssTT')) as Time

robert_mika
Master III
Master III

load

WeekStart(floor(timestamp#(Interaction,'M/D/YYYY h:mm:ssTT'))) as Weekstart,

date(floor(timestamp#(Interaction,'M/D/YYYY h:mm:ssTT'))) as Date,

time(timestamp#(Interaction,'M/D/YYYY h:mm:ssTT')) as Time

  inline [

Interaction

6/1/2014 6:51:25PM

7/31/2014 7:16:15PM

12/3/2014 6:15:20PM

]

Dimension for Chart WeekStart

Expression Count(Date)

]12-May-15 2-43-09 PM.jpg

mario-sarkis
Creator II
Creator II
Author

it is not working like this in the script

can u help and show me how to write it in the script ?