Assets: Calculated measure over inbound reference

I have an assets schema in which software is registered. To illustrate my problem, I have created a very simplified schema: A software is divided into three objects in the following hierarchy:

Software
- Software Identification
- Support Contract

Software is the generic software title, supplemented with the department that supports the software (MS SQL Server, for example):

Software Identification is the specific version of a software that links the generic software to a support contract (MS SQL Server 2016 for example):

Support Contract contains the date when the vendor support expires:

I have been tasked with creating a report that lists per department (software) how many software versions are no longer supported (date on the support contract). Unfortunately, I don’t see a way to use the departments as a dimension and sum up the support contracts from this object type, as the reference directions are not following the hierarchy:

Software ← Software Identification → Support Contract

What would be the best way to solve this task?

Thanks and kind regards…