I have this type of data; ObjectPrice Regnr depreciation Counter Primary opprinpris transaksjonstid est_price 2237500,00 AE28404 0,000416667 1 1 2237500 1600000,00 AE28404 0,000277667 2 0 2237500 1096 1556578,033 1100000,00 AE30864 0,000277667 1 1 1100000 800000,00 AR99993 0,000277667 1 1 800000 795000,00 AR99993 0,000277667 2 0 800000 398 711590,9333 799000,00 AR99993 0,000277667 3 0 800000 32 ... I want IF counter = 3 then transaksjonstid= lag (transaksjonstid)+(transaksjonstid) else if counter =4 then transaksjonstid = lag2(transaksjonstid)+lag(transaksjonstid) +transaksjonstid etc...
... View more