The answer provided by @davidebacci is a working solution, but the performance is rather bad. Before, I was using a Nested Join (left outer join), but I needed an additional condition. This topic helped me in finding a way to implement this condition, but my model is not loading anymore.
Any hints on improving the performanc?