Show item as done automation - with multiple dependencies

There is an automation where you can change the status of an item to “done” if an item it depends on is done. However, if an item depends on several other items, there is no way I can find to automate its status change when all the items it depends on are done.
Is there any way to do it?