Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi com,
i have this section in my editor:
-------------------------------------------------------------------
temp:
NOCONCATENATE
load articlenumber,amount,date as in_date
Resident time_TAB
where "in/out" ='in';
left join
load articlenumber,date as out_date
Resident time_TAB
where "in/out" ='out';
time_in_company:
Load articlenumber,in_date,out_date,
out_date-in_date as diffdate resident temp;
-------------------------------------------------------------------
now i want the diffdate to be 0 when its drops below 0, cause a product cant be for -5 days in the company.
i tried some if constelations but i didn't work!
Help pls, thanks in advance!
Eric
May be this:
temp:
NOCONCATENATE
LOAD articlenumber,
amount,
date as in_date
Resident time_TAB
where "in/out" ='in';
left join (temp)
LOAD articlenumber,
date as out_date
Resident time_TAB
where "in/out" ='out';
time_in_company:
LOAD articlenumber,
in_date,
out_date,
out_date-in_date as diffdate
Resident temp
Where out_date-in_date >= 0;
May be this:
temp:
NOCONCATENATE
LOAD articlenumber,
amount,
date as in_date
Resident time_TAB
where "in/out" ='in';
left join (temp)
LOAD articlenumber,
date as out_date
Resident time_TAB
where "in/out" ='out';
time_in_company:
LOAD articlenumber,
in_date,
out_date,
out_date-in_date as diffdate
Resident temp
Where out_date-in_date >= 0;
ok i changed some settings and everythings works fine.
now i try to do the same with a counter for the amount of unit in and out so i have a more realistic number.
So i count down the first date till every unit is out and then take the next in-date!
Do u have some advice for me or tips?
Not sure I understand what the issue now is? Can you elaborate?
so for example u have this story:
article amount in/out date
1 20 in 2/4/2016
1 2 in 4/6/2016
1 5 out 10/6
1 17 out 12/6
so the first one would be 5 out from 2/4 - 10/6 in store
and the other one would be 17
15 from 2/4 to 12/6
and 2 drom 4/6 to 12/6
so First in First out but with a count down of the amount so the numbers are korrekt!
Thx for ur help in advance!