Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Calculation

I have a set of work orders that are broken down into the following categories:

Age of the Work Orders by Trades

Trade      0-29     30-59     60-89     90+

    A

    B

    C

The work orders can have various status but what I would like is a count of work orders in each of the 4 groups based on total new, and working.  The other item is I only want work days which I believe is use the networkdays command.

Any help would be grateful.

Thanks,

2 Replies
qlikpahadi07
Valued Contributor

Re: Calculation

You can use Interval match function for the same.

or attach a sample data

MVP
MVP

Re: Calculation

Hi

You can do it in a table/chart using 4 expressions:

Count(If(Today() - WorkOrderDate < 30, '0-29', WorkOrderNo))

Count(If(Today() - WorkOrderDate >= 30 And Today() - WorkOrderDate < 60, '30-59', WorkOrderNo))

Count(If(Today() - WorkOrderDate >= 60 And Today() - WorkOrderDate < 90, '60-89', WorkOrderNo))

Count(If(Today() - WorkOrderDate >= 90, '90+', WorkOrderNo))

(change the fieldname to match your data model).

This method hard codes the intervals. You could simplify this if in your load, you create a WorkOrderAge field. or interval match the ages.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser