Postgres SUM over PARTITION BY "tolerate" null values
Your image from the comment (which should be text in the question) shows that you run the query with this WHERE clause:
WHERE ... AND (&quot;SupplierFacilityId&quot; IS NULL OR &quot;SupplierFacilityId&quot; = 647)

So you can just drop &quot;SupplierFacilityId&quot; from PARTITION BY to achieve what you want: rows with &quot;SupplierFacilityId&quot; IS NULL are treated as equal peers of the partition:
sum(s.&quot;QuantityChange&quot;) OVER (PARTITION BY s.&quot;LocationId&quot;, s.&quot;PartId&quot;
                              ORDER BY s.&quot;DueDate&quot; ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS &quot;RunningSum&quot;

Also, since the default framing option is RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW, and assuming that (s.&quot;LocationId&quot;, s.&quot;PartId&quot;, s.&quot;DueDate&quot;) is defined unique (which makes RANGE and ROWS equivalent in this context), you can just drop the custom framing options:
sum(s.&quot;QuantityChange&quot;) OVER (PARTITION BY s.&quot;LocationId&quot;, s.&quot;PartId&quot;
                              ORDER BY s.&quot;DueDate&quot;) AS &quot;RunningSum&quot;

Without said WHERE clause, your goal would be unachievable with a simple window function as you would have to use the same rows with NULL values in multiple partitions. You would have to multiply those rows first ...