While the management of PV generation is the prime application of residential batteries, they can deliver additional services in order to help systems to become cost-competitive. They can level-out the demand and potentially reduce the cost and emissions of the energy system by reducing demand peaks. In this study, community energy storage (CES) is optimised to perform both PV energy time-shift and demand load shifting (using retail tariffs with varying prices blocks) simultaneously. The optimisation method obtains the techno-economic benefits of CES systems as a function of the size of the community ranging from a single home to a 100-home community in two different scenarios for the United Kingdom: the year 2020 and a hypothetical zero emissions target. It is demonstrated that the levelised cost and levelised value of CES systems reach intermediate values to those achieved when both applications are performed independently. For the optimal performance of a battery system being charged from both local PV plants and the grid, our results suggest that the battery should be sized suitable to ensure it can fully discharge during the peak period.