Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Question for using peek.
My data is already sorted by date, latest date is at the bottom.
I am trying to load an equation with peek().
(latest wip - (next to last wip - latest processed))
Here is what I have in my script and is coming up with different values.
(WIP - ((Peek(WIP,-1)) - Processed)) as WIP_Test
any tips or other methods?
Edit*
also tried Previous()
(WIP - ((Previous(WIP)) - Processed)) as WIP_Test
That doesn't work either.
Hi Joshua,
What is your expected output? How Area, Program, and Date Should be grouped?
BR,
Vijay
I am trying to get an average WIP inbound per client for the last 30 days. The table following this is showing the clients in Mechanical Inspection for the last 30 days and a total.
I am also trying to get a current month daily inbound line graph as follows
I am just trying to figure out how to create the "WIP Inbound" column in Qlik rather than computing it in excel first.
Check this? Let me know if this is not what you looking for.
I created two variable for Max and Previous max of WIP.
Like
vWIP = Max(WIP) - --> Max of WIP
vWIP2nd = Max(WIP, 2) ---> 2nd Max of WIP
Expression will be like.
WipTesting:
Load
WIP,
$(=vWIP) - ($(=vWIP2) - Processed) as WIP_Test
Resident WIP_Raw_Data
;
The Avg(WIP_Test) should be the same as the "Average Inbound" that is already the third column in the sheet.
Sorry can you explain a little. Why they both should be? Can you take one example and let me know for that specific Client name what should be your value for WIP_Test field. ?
Can you explain the expr you are trying to use for WIP_Test please?
If you look at the raw data file itself, there is only one row per client per day.
If you look at the output from the file you provided, there are multiple for each day instead of each day.
So that would throw off the average.
Hi Joshua,
I got you PrevWIP for each record. I've small error that I'm trying to find and fix it. Let me know if this will work for you.
The error is that for some reason in table I got only 12326 records even though processing was for all records. I'm looking into it.
I think there are duplicates. that is causing the difference in record count from original.
I think this should work, I will look at it in a little while, few things to catch up on here, but after looking at your pics closer, the WIP Inbound is correct. Thanks man.
Hi Joshua,
Script processing may not be needed if we can come up with set analysis expression for Min Date record of each Area, Program combination. For that records we can ignore PrevWIP in WIPInbound calculation. Otherwise we have to use it. This is after PrevWIP value has been added in the table. This will allow to drop FOR LOOP processing that I've in the script. FOR LOOP slows down little bit.
I hope what I'm saying here makes sense and hope it will work.
BR,
Vijay