An ordered

$k$-tuple

$\pi =({x}_{1},\cdots ,{x}_{k})$ of elements of a finite metric space

$(X,d)$ is called a profile. An element

$x\in X$ for which

${\sum}_{i=1}^{k}d(x,{x}_{i})$ is minimum is called a median of

$\pi $. The median procedure is the function

$\text{Med}\left(\pi \right)=\{x\mid x$ is a median of

$\pi \}$. These concepts are studied in the case when

$X$ is the vertex set of a graph with the usual distance. In particular, they are studied for median graphs, i.e. connected graphs

$G$ in which for any three vertices

$x$,

$y$,

$z$ there is a unique vertex

$w$ on the geodesic between each pair of

$x$,

$y$,

$z$. Special attention is paid to cube-free median graphs.