You can use dynamic parameters anywhere in an expression where their data type can be easily deduced.
Once the type of a dynamic parameter is determined based on the expression it is in, that expression is allowed anywhere it would normally be allowed if it did not include a dynamic parameter.