This video explains how to create vertical macro expression in CDI.
For further information, refer to the following KB:
https://docs.informatica.com/integration-cloud/data-integration/current-version/transformations/transformations/expression-macros/vertical-macros.html