Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I need to change the duration in my dashboard from calendar days into working days.
I know I need to use the Network days function however I've never used this before being rather new to the qlikview world.
this is my current load for the Duration:
IF(WI_AED>0,(Timestamp(TIMESTAMP#(WI_AED&' '&WI_AET,'YYYY-MM-DD hh:mm:ss'))-Timestamp(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss'))),(utc()-Timestamp(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss')))) AS WI_DURATION,
Try
IF(WI_AED>0,
Networkdays(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss'), TIMESTAMP#(WI_AED&' '&WI_AET,'YYYY-MM-DD hh:mm:ss')),
NetWorkdays(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss'), utc() )
) AS WI_DURATION,
Do you need your duration in Days and Hours or just days?
Hi Sunny, days and hours.
Try
IF(WI_AED>0,
Networkdays(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss'), TIMESTAMP#(WI_AED&' '&WI_AET,'YYYY-MM-DD hh:mm:ss')),
NetWorkdays(TIMESTAMP#(WI_CD&' '&WI_CT,'YYYY-MM-DD hh:mm:ss'), utc() )
) AS WI_DURATION,
If you need the working time, given a begin and end time on each working day, you can look into
Stefan, if we need just days, why not just use WI_CD?
IF(WI_AED>0,
Networkdays(Date#(WI_CD, 'YYYY-MM-DD'), Date(WI_AED, 'YYYY-MM-DD')),
NetWorkdays(Date#(WI_CD, 'YYYY-MM-DD'), UTC())) AS WI_DURATION,
That's right,
you only need the date part, and if that's what WI_CD is describing (and it looks like this), this will be enough.