I am trying to sum up the total of text boxes inside a nested gallery.
Example:

Country and Type are one vertical gallery, called Forecast and the text boxes are in a horizontal gallery called Forecast_Units. In the black box underneath (which is outside of both galleries) I would like to display the total of that column.
I've tried this formula:
Sum(
Forecast.AllItems,
Sum(
Forecast_Units.AllItems,
Value(S050.Text)
)
)
However, while it doesn't provide me with an error, it doesn't populate.

I've tried various iterations of Sum, Value etc to no avail. I've also made sure the S050 text box is formatted as number.
Any assistance please?