Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The following expression gives me total number of days. I just need to get working days. How should I change the following expression to get workingdays:
sum
({<WorkflowElapseDays
={'Customer'
}>}diff
)/count
(distinct
Application_Id
)
use NETWORKDAYS() Function
I tried the following but didnot work:
networkdays(sum ({<WorkflowElapseDays={'Customer'}>}diff))/count(distinct Application_Id)
Hi!
You can use the function NETWORKDAYS , returns the works days between the two dates you pass in the function
networkdays (fecha_inicio, fecha_fin {, vacaciones})
example:
NetWorkDays(MonthStart( today()),Monthend( today()))
good luck!
Fernando
to use the Networkdays you need a start date and an end date something like
NETWORKDAYS('01/01/2012', TODAY()) |
I have the following code how will use networkdays in it for diff. At the moment diff gives me total numbe of days
Wrkflow:
LOAD Process_Code ,
Application_id as Application_Id ,
Workitem_Id ,
Activity_Code ,
Timestamp ( Txn_Date ) as Txn_Date ,
State_Code ,
Assigned_User_Id ,
Assigned_Dept_Id ,
Actioned_User_Id ,
applymap ( 'Trays' , Activity_Code , null ()) as Tray ,
applymap ( 'Trays' , Activity_Code , null ())& State_Code as Link ,
if ( State_Code = 'CMP' , timestamp ( Txn_Date ), null ()) as [CMP_Date]
FROM
( txt , codepage is 1252 , embedded labels , delimiter is '\t' , msq ) ;
Wrkflow2:
Load * , 1
Resident Wrkflow
Order by Application_Id , CMP_Date , Tray , State_Code;
DROP Table Wrkflow;
Wrkflow3:
Load * ,
CMP_Date - if ( State_Code = 'CMP' ,( Previous ( CMP_Date )), '' ) as diff ,
if ( State_Code = 'CMP' ,( Previous ( CMP_Date )), '' ) as pre
Resident Wrkflow2;
DROP Table Wrkflow2;
Fernando where should i add networkdays in the following code:
Wrkflow:
LOAD Process_Code ,
Application_id as Application_Id ,
Workitem_Id ,
Activity_Code ,
Timestamp ( Txn_Date ) as Txn_Date ,
State_Code ,
Assigned_User_Id ,
Assigned_Dept_Id ,
Actioned_User_Id ,
applymap ( 'Trays' , Activity_Code , null ()) as Tray ,
applymap ( 'Trays' , Activity_Code , null ())& State_Code as Link ,
if ( State_Code = 'CMP' , timestamp ( Txn_Date ), null ()) as [CMP_Date]
FROM
( txt , codepage is 1252 , embedded labels , delimiter is '\t' , msq ) ;
Wrkflow2:
Load * , 1
Resident Wrkflow
Order by Application_Id , CMP_Date , Tray , State_Code;
DROP Table Wrkflow;
Wrkflow3:
Load * ,
CMP_Date - if ( State_Code = 'CMP' ,( Previous ( CMP_Date )), '' ) as diff ,
if ( State_Code = 'CMP' ,( Previous ( CMP_Date )), '' ) as pre
Resident Wrkflow2;
DROP Table Wrkflow2;