Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amit_saini
Honored Contributor III

Calculation based on Business days only help!

Hi Folks ,

Below is my calculated expression for Ticket Age :

=if(IsNull(if(%ClosedDate < 2958465, date(%ClosedDate))),floor(today()-(date(%OpenedDate))),floor((if(%ClosedDate < 2958465, date(%ClosedDate)))-(date(%OpenedDate))))

Now my requirement is not to include Sat, Sun in this calculation , want Ticket Age based on only 5 working days.

Kindly suggest!

Thanks,
AS

1 Solution

Accepted Solutions
MVP
MVP

Re: Calculation based on Business days only help!

May be like:

if(IsNull(if(%ClosedDate < 2958465, date(%ClosedDate))),

floor(Networkdays((date(%OpenedDate),today()))),

floor(

   (if(%ClosedDate < 2958465, Networkdays(date(%OpenedDate),date(%ClosedDate))))

  )

)

4 Replies
Not applicable

Re: Calculation based on Business days only help!

Hi,

You can use NetWorkDays Function.

amit_saini
Honored Contributor III

Re: Calculation based on Business days only help!

Nandkishor,

I have already tried this but getting ' - ' values.

Thanks,
AS

MVP
MVP

Re: Calculation based on Business days only help!

May be like:

if(IsNull(if(%ClosedDate < 2958465, date(%ClosedDate))),

floor(Networkdays((date(%OpenedDate),today()))),

floor(

   (if(%ClosedDate < 2958465, Networkdays(date(%OpenedDate),date(%ClosedDate))))

  )

)

amit_saini
Honored Contributor III

Re: Calculation based on Business days only help!

Thanks Tresesco

Community Browser