Calculate Expression does not work when the third value is missing

Hello everyone,

we have an object with a class called construction project, for this there is as property the totals from the individual invoices which are categorized. In this categorization there is then a sum as an example we have a category "Sum Material", here the sum of all invoices is displayed with this category, the same we have for "Sum Fuel" & "Sum Subcontractor". Problem is now that the "Total sum" so the sum from all categories together is displayed only when all 3 categories are filled, how do I set the invoice in the Property Calculator so that a sum comes about even with only two filled categories.