We introduce functions of bounded variation on median algebras and study some properties for median pretrees. We show that if X is a compact median pretree (e.g., a dendron) in its shadow topology then every function f : X → R of bounded variation has the point of continuity property (Baire 1, if X, in addition, is metrizable). We prove a generalized version of Helly's selection theorem for a sequence of functions with total bounded variation defined on a compact metrizable median pretree X.