Never mind, I have found a simple solution. If anyone else is interested:
In LocationCommon_0.php
create a copy of function display_item_quantity_in_warehouse
get selected warehouse with
$selected_warehouse = $_POST['filter__sku'];
and filter in
foreach ($locations as $v) {
if($selected_warehouse != "__NULL" && $v['warehouse'] != $selected_warehouse) // exclude all but filtered
continue;
Finally, created a custom column using this new function.