Define $f:\Bbb R \to \Bbb R$ by $f(x)=x$, for $0\leqslant x\leqslant\frac12$, with $f(x)=\frac12-x$ for $\frac12<x\leqslant1$ and $f(x)=0$ otherwise. This function is continuous and piecewise affine: It comprises two non-zero affine functions respectively on two adjacent intervals, and is zero elsewhere.
The basic idea is to build a function in stages. Starting with $f_1:=f$, at stage $n$ $(n=1,2,...)$ we construct a function $f_n$. At stage $n+1$, we make smaller, steeper, and shifted copies of $f$ and add them to $f_n$ to build a more jagged function $f_{n+1}$. These little copies form a relative uptick and downtick in each affine segment of $f_n$, while preserving continuity and piecewise affinity.
At each stage $n=2,3,...\,$, the number of affine segments is doubled. Thus, suppose that we have just built $f_n$, which has $2^n$ affine segments of equal length. To make $f_{n+1}$, to each segment is added a small scaled shifted copy of $f$ to fit. Thus, say that $f_n$ has an affine segment between $k/2^n$ and $(k+1)/2^n$, where $k\in\{0,...,2^n-1\}$; what we add is
$$f_{n,k}:x\mapsto\frac1{n^2}f(2^nx-k)\quad(x\in\Bbb R),$$
so that $$f_{n+1}:=f_n+\sum_{k=0}^{2^n-1}f_{n,k}\quad(n=1,2,...).$$
Then $f_\infty:=\lim_{n\to\infty}f_n$ is continuous but of unbounded variation on any subinterval of $[0\,\pmb,\,1]$.