How count value according to these values of rows?
Counting subtraction I expect to get 2000. So how write DAX formula in order to get this result? We have same object, it's id but different date with value, credit and debet. So if date is bigger than cre-det.
I have tried this
var _max = maxx(filter('x', [DATE] <[DATE]),[DATE])
var _val = sumx(filter('x',[DATE] =_max), [CRE]-[DET])