You can use array-functions with QGIS expressions to treat
NULL (empty) values as 0 (zero). Since QGIS 3.18, there are new aggregate functions for arrays, so that it's easy to calclulate a sum or a mean.
Add fields manually
This expression calculates the sum of the four numbers from
array_sum( array( "value_1", "value_2","value_3","value_4"))
array_mean() to calculate the mean for this four numbers.
Add all fields automatically
To get the values of all fields in an array, use
map_avals( attributes( )). Than combine it with the solution above.
If do not want all, but most fields, removing just a few fields from the calculation, first get a list of all field-names and than remove the field-names you dont want to include:
To get an array of all fieldnames, use:
To remove some field-names, the expression is a bit longer. In line 10 to 13 you find the four fieldnames that should not be considered. Adapt this to your needs, the rest of the expression does not need any adaption:
map_akeys( attributes( )),
@element not in (
) || ')'
Screenshot: based on your screenshot, I calculated a new field IRAT_value with the expression from above. It calculates the sum of all fields except the first four fields (the ones named
SWno), thus it creates the sum from
NULL is treated as zero (0). So for the first row: 3 +  + 3 + 1 + + 4 + 5 + 6 + 8 = 30: