Hi. Are you trying to add this to a task view or report? If so, your syntax above looks pretty good. If you are trying to add this to a project view or report, you will need to utilize collections. You can get more information on referencing collections - here.
I would try something like this if ...