Stellar haloes and thick discs are tracer populations and make only a modest contribution to the overall gravity field. Here, we exploit the virial theorem to provide formulae for the ratio of the globally averaged equatorial to vertical velocity dispersion of a tracer population in spherical and flattened dark matter haloes. This gives virial sequences of possible physical models in the plane of global anisotropy and flattening. The tracer may have any density distribution, although there are particularly simple results for power laws and exponentials. We prove the Flattening Theorem: for a spheroidally stratified tracer density with axis ratio q in equilibrium in a dark density potential with axis ratio g, the ratio of globally averaged equatorial to vertical velocity dispersion depends only on the combination q/g. As the stellar halo density and velocity dispersion of the Milky Way are accessible to observations, this provides a new method for measuring the flattening of the dark matter distribution in our Galaxy. If the kinematics of the local halo subdwarfs are representative, then the Milky Way’s dark halo model is oblate with a flattening in the potential of g≈ 0.85, corresponding to dark matter density contours with flattening ≈0.7. The fractional pressure excess for power-law populations is roughly proportional to both the ellipticity and the fall-off exponent. Given the same pressure excess, if the density profile of one stellar population declines more quickly than that of another, then it must be rounder. This implies that the dual halo structure claimed by Carollo et al. for the Galaxy – a flatter inner halo and a rounder outer halo – is inconsistent with the virial theorem. For the thick disc, we provide formulae for the virial sequences of double-exponential discs in logarithmic and Navarro–Frenk–White (NFW) haloes. There are good matches to the observational data on the flattening and anisotropy of the thick disc if the thin disc is exponential with a short scalelength ≈2.6 kpc and local surface density of 56 ± 6 M⊙ pc−2, together with a logarithmic dark halo. Thin discs with long scalelengths ≈3.5 kpc are disfavoured. Likewise, NFW potentials do not seem to produce virial sequences matching the thick disc kinematics.