Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 >?
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)
Could you post your data or app?
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.
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.
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
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)
can i write it like this in the script ?
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
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)
]
it is not working like this in the script
can u help and show me how to write it in the script ?