Hi, I'm new in Sas and I don't have a clue of how to do one step of my program. Can you, please, give me some help? I need count and take avg from my stock, but only in the days I had the item in stock. Base Table. Date Item Qty Stock 01FEB2018 T-shirt1 2 02FEB2018 T-shirt1 3 03FEB2018 T-shirt1 3 04FEB2018 T-shirt1 38 05FEB2018 T-shirt1 38 06FEB2018 T-shirt1 2 07FEB2018 T-shirt1 2 08FEB2018 T-shirt1 2 09FEB2018 T-shirt1 1 10FEB2018 T-shirt1 2 15FEB2018 T-shirt1 1 16FEB2018 T-shirt1 1 17FEB2018 T-shirt1 1 18FEB2018 T-shirt1 72 19FEB2018 T-shirt1 68 20FEB2018 T-shirt1 69 The variables DateBegin and DateEnd is not necessary. I put in the result table to be more to figure what I need. Result Table Item DateBegin DateEnd CountDays AvgStock T-shirt1 01FEB2018 10FEB2018 10 9,3 T-shirt1 15FEB2018 20FEB2018 6 35,3 Thanks in advanced.
... View more