Note that the parentheses are important to get the correct result (or you can just subtract the last term in the SUMX). For example, a good way to calculate the total duration for the green-check table above is with an expression like this (see #4 for the FIXED part). Instead of adding another column to your model in the query editor or with DAX, you can often calculate your duration with a simple measure. Note that the recommended table above doesn't have a duration column. Again, this will reduce file size and increase the flexibility of your model (e.g., you can have a Date table and a Time table (see video below) instead of a massive DateTime table). Usually, this can be done easily in the query editor by splitting the column on the space.
If you do need time analyses, split your DateTime columns into separate Date and Time Columns. This will significantly reduce file size and improve performance. If you don't need time analysis, convert all DateTime columns you do need into Date columns. If you don't care about dates, delete all those DateTime columns. As with any model, delete any columns you will never need.