Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am Very New to the Qlikview world, and im trying to work out that average days it takes to get to one stage to the next.
For example I need to know the average days it takes to get from [Gate 2 sign off] to the [Customer order approved]?
Any Help would be greatly appreciated.
Hi Lee,
The function you can use is Avg() on the expression.
Try this, I attach an example of average.
Best regards,
Agustin.
Hi Lee,
The function you can use is Avg() on the expression.
Try this, I attach an example of average.
Best regards,
Agustin.
Since the calculation should be rather static, I would do some prework in the script (assuming a simple input data table as shown below):
Set DateFormat = 'MM/DD/YYYY';
INPUT:
LOAD * INLINE [
ID, Stage, Date
1, Init, 03/01/2016
1, Gate 2 sign off, 03/10/2016
2, Init, 03/01/2016
1, Customer order approved, 03/20/2016
2, Gate 2 sign off, 03/12/2016
2, Customer order approved, 03/18/2016
];
RESULT:
LOAD *,
If(ID = previous(ID), Date-previous(Date)) as Duration,
If(ID = previous(ID), previous(Stage)&'->'&Stage) as Transition
Resident INPUT
ORDER BY ID, Date;
DROP TABLE INPUT;
Then create a chart with dimension Transition and =Avg(Duration) as expression.
Hope this helps,
Stefan
Hi Agustin,
I can't see the attachment?
Please could you resend the example?
Kind Regards,
Lee
Hi lee,
This is rare, i can see it..
See in your thread How Can I work out the Average days from one stage to the Next.
Attached again..
Best Regards,
Agustin
Thank you Agustin