To add macros in view mode:
Click the More actions (⋯) menu in the top-right corner of the page.
Go to Apps → Use Table Filter App Macros.
In edit mode, macros are added just like any other Confluence macros:
Start entering /Pivot Table and select the macro.
On the editor pane, click Insert -> View more, find the macro and insert it on the page.
Make sure the source table - whether manually created or generated by another macro - is placed inside the macro body.