At the individual level, commuting can be seen as part of a search process that may lead to adjustments in terms of migration or change of workplace. The behaviour of commuters is affected by individual characteristics and factors related to housing, labour and transport markets. It can provide insight into factors related to different municipalities’ levels of attraction. In our study, we provide a longitudinal analysis of individual commuting behaviour during a one-year study period: we simultaneously address the dynamics of ending commuting by a migration event, a change of workplace, or both. Our study is situated in the urban region that surrounds lake Mälaren of Sweden, including its capital Stockholm. We draw on unique register data on the entire commuter population of that region and linked contextual data on the characteristics of the municipalities where the commuters live and work. Migration rates are strongly related to demographic variables, whereas the propensity to change workplace mainly varies with economic variables. We demonstrate that the attraction of a municipality in terms of residence increases with the general accessibility to workplaces and decreases with its level of housing prices. An increased supply of new dwellings in a municipality has a greater impact on the capacity to increase its population than has an increased supply of workplaces.