Hi Rob,
Unfortunately the possibilities are very limited, as calculated fields can only reference objects found in the References tab of the object in the API Explorer.
Starting from a sub-task or "sub-sub-task", you are able to reference the parent task or the main task using
{parent}.{<fieldName>}
resp.
{parent}.{parent}.{<fieldName>}
To find out on which subtask layer the task is located, you can use
{ident}
Combined with an IF() function you could possibly CONCAT() your desired output.
If Fusion is an option, you can have a look at this thread.
I hope I was able to help a little bit.
Regards
Lars