Yonggang Huang's reply is technically correct, except for the last sentence - you cannot persist the column, since the if the data is updated in the child table is updated, the column in the parent table should change its value.
However, I recommend against using a scalar function in a computed column, and even more a scalar function that accesses in another table. This comes with a big performance overhead, as the function will be called for every row. This applies also SQL 2019, since inlining of scalar functions does not happen with computed columns.
There are two alternatives:
- Define a view which evades the need for the scalar function.
- Make the column a real column which is populated from the data in the child tables through triggers. This is a more advanced solution and you need to know what you are doing.