In this paper we study the (BV, Lp)-decomposition, p=1,2, of functions in metric random walk spaces, a general workspace that includes weighted graphs and nonlocal models used in image processing. We obtain the Euler-Lagrange equations of the corresponding variational problems and their gradient flows. In the case p=1 we also study the associated geometric problem and the thresholding parameters describing the behavior of its solutions.











