Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all. Just beginning to learn Qlikview. I'm hung up on developing a chart that displays percent of units (serial number) installed within 3 days of the scheduled date.
the data...
Serial Number | Install Date | Scheduled Install | Days +/- Scheduled |
---|---|---|---|
12345 | 10/5/2012 | 10/5/2012 | 0 |
23456 | 10/5/2012 | 10/9/2012 | 4 |
34567 | 10/1/2012 | 10/2/2012 | 1 |
45678 | 10/1/2012 | 10/5/2012 | 4 |
...so the metric would be 50% (2/4)
my expression of the count of # Installed in month is working...
=Count(SERIAL_NUMBER)
my expression to get the count of # installed within 3 days of scheduled date is not working...
if (DAY_ACT_EC.FULL_DATE-DAY_ECSCHED.FULL_DATE < 4, count(SERIAL_NUMBER), 0)
Is this the correct approach to this or am I completely off in my method?
Thanks for the help
Mike
Your expression should be:
count(if (DAY_ACT_EC.FULL_DATE-DAY_ECSCHED.FULL_DATE < 4, SERIAL_NUMBER))
But you should avoid using if-statements in your expressions, since they can degrade the performance. Instead, try to use set analysis like this:
count({<DaysScheduled={"<4"}>} SERIAL_NUMBER)
to do so, you must precalculate the DaysScheduled in the script and have the values in a field.
Your expression should be:
count(if (DAY_ACT_EC.FULL_DATE-DAY_ECSCHED.FULL_DATE < 4, SERIAL_NUMBER))
But you should avoid using if-statements in your expressions, since they can degrade the performance. Instead, try to use set analysis like this:
count({<DaysScheduled={"<4"}>} SERIAL_NUMBER)
to do so, you must precalculate the DaysScheduled in the script and have the values in a field.
That worked perfectly. Thank you very much.