21 Replies Latest reply: Oct 23, 2017 1:58 PM by Sujith Madhavan

# Peek and create flag

Hello,

Here is my original data set in the application.

REQ field is just repeating.

Any help ism highly appreciated.

 ITEM Location Available AvailableDate REQ Can fill 1 Dallas 204 10/24/2017 104 104 1 Dallas 300 11/5/2017 104 1 Dallas 60 11/15/2017 104 1 Dallas 204 12/1/2017 104 1 Dallas 204 12/2/2017 104 2 Chicago 35 10/21/2017 2 2 2 Chicago 40 12/1/2017 2 2 Chicago 44 12/1/2017 2 2 NY 38 12/5/2017 3 2 NY 43 12/5/2017 3 3 Chicago 300 10/21/2017 250 250 3 Chicago 0 12/1/2017 2 3 Chicago 0 12/1/2017 2 3 NY 3 12/5/2017 400 3 3 NY 10 12/5/2017 3
• ###### Re: Peek and create flag

Hope you are looking this

if(REQ=Previous(REQ),' ' ,REQ) as NEW

• ###### Re: Peek and create flag

Anand,

I'm looking to calculate (Available - REQ) to see how many i can fill in the 'Can fill' column

• ###### Re: Peek and create flag

Can you explain behind the logic? Atleast consider as 1 row to show output

• ###### Re: Peek and create flag

Item 1 has 104 units of requirement.

I'm getting 2014 units on 10/24.

So, i can fill those 104 units.

Now. i go to Item 3 at NY.

It needs 400 but i'm getting only 3 units on 12/25.

So, i can only fill 3

• ###### Re: Peek and create flag

Again not clear, What is the value 2014 and 10/24?

• ###### Re: Peek and create flag

Anil,

I see only 204.

Where do you see 2014?

• ###### Re: Peek and create flag

Oh.

I apologize.

It is a typo.

it should be 204

• ###### Re: Peek and create flag

Not clear please elaborate more of provide the expected output here to and understand the output.

• ###### Re: Peek and create flag

Item 1 has 104 units of requirement.

I'm getting 2014 units on 10/24.

So, i can fill those 104 units.

Now. i go to Item 3 at NY.

It needs 400 but i'm getting only 3 units on 12/25.

So, i can only fill 3

• ###### Re: Peek and create flag

Hey Mark,

which one is a calculated field here, are you trying to calculate REQ, here ?

also

Item 1 has 104 units of requirement.

I'm getting 2014 units on 10/24.  where is 2014 coming from its not there in your example

if you could provide the value of REQ that should actually appear then it will be helpful

• ###### Re: Peek and create flag

I see only 204.

It is not 2014

• ###### Re: Peek and create flag

Sujith,

It should look for available qty and available date and create a new filed - 'Can Fill' with how much can it fill ?

 ITEM Location Available AvailableDate REQ Can fill 1 Dallas 204 10/24/2017 104 104 1 Dallas 300 11/5/2017 104 1 Dallas 60 11/15/2017 104 1 Dallas 204 12/1/2017 104 1 Dallas 204 12/2/2017 104 2 Chicago 35 10/21/2017 2 2 2 Chicago 40 12/1/2017 2 2 Chicago 44 12/1/2017 2 2 NY 38 12/5/2017 3 2 NY 43 12/5/2017 3 3 Chicago 300 10/21/2017 250 250 3 Chicago 0 12/1/2017 2 3 Chicago 0 12/1/2017 2 3 NY 3 12/5/2017 400 3 3 NY 10 12/5/2017 3
• ###### Re: Peek and create flag

What about the data for ITem 1 Available 300 available date 11/5/2017 ,

is REQ 104, why is can fill blank, shouldn't it be 104 as well ?

• ###### Re: Peek and create flag

Sujith,

104 is the just repeating quantity by Place and ITEM. (Nature of data)

Since, we got 104 for ITEM 1 and location Dallas at 10/24.

So, the demand 104 is closed.

• ###### Re: Peek and create flag

Let me put it more simple.

I'm tring to create a logic with the below sample data:

 ITEM Incoming_Qty Incoming Date Required Can fill 1 81 10/19/2017 0:00 126 81 1 122 11/1/2017 0:00 45 1 214 11/1/2017 0:00 1 233 11/9/2017 0:00

I have 126 units of demand.

I'm looking at when can i get my qty - I have multiple dates.

So, i see that i'm getting 81 on one date.

So, i can fill only 81 units.

Now, the rem. quantity is 45. This can be filled with the incoming qty on 11/1/2017.

Req O/P: 'Can fill' column in the above table.

• ###### Re: Peek and create flag

stalwar1

Can you please give a look?

• ###### Re: Peek and create flag

Mark,

Try this

ITEMTEMP:

ITEM,
Location,
Available,
AvailableDate,
REQ
(ooxml, embedded labels, table is Sheet2)
;

NoConcatenate
ITEM:
ITEM,
Location,
Available,
AvailableDate,
REQ,
if(isnull(CANFILL),0,CANFILL)+ if(IsNull(Pavail),0, if(ITEM&Location= previtemdate,Pavail,0)) as CANFILL ,

BALANCE ;