I also have created customizable pivot table objects using a similar concept.
What I find works well is creating list boxes which are presented a toggle-able (check boxes) and then using this as the expression for the condition for each dimension (or expression, I have choices for each).
GetFieldSelections(_metrics) LIKE '*Number of enrolments*' OR GetFieldSelections(_metrics) LIKE '*ALL*'
Put a version of this with each metric name within the first LIKE criteria.
The drawback with this method is that when the selections default to 'NOT Number of enrolments' because all but that are selected, it breaks it, but I don't find people tend to use that many metrics, so it works well.
Also, I'd set a pivot to always fully expanded. That works best.