How to create calculate field to fetch previous value in column?

Hi All,

I have 3 columns namely (Date, A,B,C) and I need to fetch previous value in C column and calculate to A, B column value,

example : C2 = C1+A2-B2

pls help me out for calculated field

image

You can use a lag function.