  We study a characterization of BV and Sobolev functions via nonlocal
functionals in metric spaces equipped with a doubling measure and supporting a
Poincar\'e inequality. Compared with previous works, we consider more general
functionals. We also give a counterexample in the case $p=1$ demonstrating that
unlike in Euclidean spaces, in metric measure spaces the limit of the nonlocal
functions is only comparable, not necessarily equal, to the variation measure
$\| Df\|(\Omega)$.
