  Let $M$ be a positive integer and $q\in (1, M+1]$. A $q$-expansion of a real
number $x$ is a sequence $(c_i)=c_1c_2\cdots$ with $c_i\in \{0,1,\ldots, M\}$
such that $x=\sum_{i=1}^{\infty}c_iq^{-i}$. In this paper we study the set
$\mathcal{U}_q^j$ consisting of those real numbers having exactly $j$
$q$-expansions. Our main result is that for Lebesgue almost every $q\in
(q_{KL}, M+1), $ we have $$\dim_{H}\mathcal{U}_{q}^{j}\leq \max\{0,
2\dim_H\mathcal{U}_q-1\}\text{ for all } j\in\{2,3,\ldots\}.$$ Here $q_{KL}$ is
the Komornik-Loreti constant. As a corollary of this result, we show that for
any $j\in\{2,3,\ldots\},$ the function mapping $q$ to
$\dim_{H}\mathcal{U}_{q}^{j}$ is not continuous.
