QlikView offers rich set of functions. It’s no different from power tools in your toolbox — as long as you know which tool to use to get the job done.

That said, one of the students on my Udemy QlikView developer course asked me a question. I felt it worth sharing it on this blog.

I am currently working on a university assignment and I am little confused about one of the scenario, I hope you can help me with it.

Company “XYZ” is a manufacturing company. They receive orders from different clients to manufacture different goods.

Scenario : sometime “XYZ” have to place orders on hold for some reasons like (awaiting on raw material or awaiting on further clarification, etc.)

Now, they would like to check how many days it takes to fulfill an order. From order received date till Order Delivery date. But they don’t want to calculate the period of time it was on hold and the weekends.

The tool you want to use from your power functions toolbox is called networkdays function.

Definition:

networkdays

Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.

Examples

networkdays(‘2007-02-19’, ‘2007-03-01’) returns 9

networkdays(‘2006-12-18’, ‘2006-12-31’, ‘2006-12-25’, ‘2006-12-26’) returns 8

Now, let’s create a straight table with an expression to calculate elapsed days for a given order using networkdays function.

netorkdays

Days Elapsed =

networkdays function


If you enjoyed this article, get email updates (it’s free).

Email Address:

  • sai 5:07 am on June 18, 2015 Permalink

    i have a field called First Action Met SLA in dat two values there MET and Not Met ……………..i want to show Met and Not Met values in combo chart as line in representation of %……. what is the expression fohr it using dimension month

    Ct Month First Met SLA
    Nov-14 MEt
    Nov-14 NOt MEt
    Nov-14 MEt
    dec-14 NOT met
    dec-14
    dec-14
    dec-14
    jan-15