The force balance of rotating Rayleigh–Bénard convection regimes is investigated using direct numerical simulation on a laterally periodic domain, vertically bounded by no-slip walls. We provide a comprehensive view of the interplay between governing forces both in the bulk and near the walls. We observe, as in other prior studies, regimes of cells, convective Taylor columns, plumes, large-scale vortices (LSVs) and rotation-affected convection. Regimes of rapidly rotating convection are dominated by geostrophy, the balance between Coriolis and pressure-gradient forces. The higher-order interplay between inertial, viscous and buoyancy forces defines a subdominant balance that distinguishes the geostrophic states. It consists of viscous and buoyancy forces for cells and columns, inertial, viscous and buoyancy forces for plumes, and inertial forces for LSVs. In rotation-affected convection, inertial and pressure-gradient forces constitute the dominant balance; Coriolis, viscous and buoyancy forces form the subdominant balance. Near the walls, in geostrophic regimes, force magnitudes are larger than in the bulk; buoyancy contributes little to the subdominant balance of cells, columns and plumes. Increased force magnitudes denote increased ageostrophy near the walls. Nonetheless, the flow is geostrophic as the bulk. Inertia becomes increasingly more important compared with the bulk, and enters the subdominant balance of columns. As the bulk, the near-wall flow loses rotational constraint in rotation-affected convection. Consequently, kinetic boundary layers deviate from the expected behaviour from linear Ekman boundary layer theory. Our findings elucidate the dynamical balances of rotating thermal convection under realistic top/bottom boundary conditions, relevant to laboratory settings and large-scale natural flows.