Although electricity losses constitute an important, but inevitable, amount of wasted resources (and a share that has to be funded), they remain one of the lesser known parts of an electricity system, and this despite the fact that the decisions of generators, transmission and distribution system operators and consumers all impact on them. In this paper we analyse the effects of such losses from two perspectives: from that of consumption or outflows and from that of generation or inflows. Given that end-user consumption varies across the day, consumption has direct implications for electricity losses. Indeed, demand-side management policies seek to encourage consumers to use less energy during peak hours and to reduce network congestion. At the same time, from the perspective of generation, the recent growth in distributed generation has modified the traditional, unidirectional, downward flows in electricity systems. This affects losses as energy is produced in the lower voltage network, which is closer to points of consumption. In this paper we evaluate the impact of consumption patterns and different generation technologies on energy losses. To do so, we draw on data from a real electricity system with a high level of renewable penetration, namely, that of Spain between 2011 and 2013. To the best of our knowledge, this is the first paper to analyse the real impact of consumption and the effect of each generation technology on energy losses, offering an opportunity to evaluate the potential benefits of demand-side management policies and distributed generation. Based on our results, we make a number of regulatory recommendations aimed at exploiting to the full these potential benefits. Our results should serve as a baseline for countries that are in the early stages of implementing these policies.