I have a dataset with at Customer-Date level. I want to fit a line on the data estimating spend of a customer on a certain date. One of the covariates I am using in the model is historical sales of the customers. For example, For a customer at time (t + x) the dependent variable is the sales at time (t + x), however, one independent variable is sales total sales until time (t + x), which includes sales at time (t). Now at time (t) in the data, the sale is used as a dependent variable. Hence, there is a circularity in the data, the dependent variable of a record may constitute the independent variable of another record.
I am struggling to understand the nuances of this model, both intuitively and technically. Is this even a valid way to fit a model? If not, why?