- Create a new field-based view sorted by Unsorted (i.e. NO SORT) to which you'll add a block display (no need for a page display here).
- Add the Available spaces field. Remove all other fields.
- In the Advanced section, check Use aggregation. Save.
- Back in the FIELDS section, click Aggregation settings and set the type to SUM. Save. The field should now look like so: SUM(Content : Available spaces) | Aggregation settings.
- Click SUM(Content : Available spaces), click on Rewrite results and check Rewrite the output of this field using the available replacement tokens.
E.g. Total number of available spaces: [field_daycare_available_spaces]. where [field_daycare_available_spaces] is the token available for the field that holds the number of available spaces in my content type. Of course, this token will change based on the name of the field that holds the values that you want to add.
- Add the required filters.
- Save you view.
- Go to the blocks admin page and configure your block.
- Sit back and enjoy.