You can’t create dynamic relations like that. What you can do however is use plain SQL and use the databaseManager.getDataSetByQuery() function.
Or maybe you only want to be able to use a dynamic value on the left side of a join then you could use a global for that.