One thing that I sometimes do is build this with $Field.
I have a list box for dimensions with $Field
I setup variables 1 - however many needed with =Subfield(Concat(DISTINCT $Field, ','), ',', 1) for first $Field but I setup the variables in an Excel sheet because I can use the power of Excel to avoid having to manually create these variables where just the integer changes.
Then in the chart I use ='$(vDim1)', ='$(vDim2)'... with a condition to enable the dimension.
I read these vDIM1 variables from a spreadsheet because I can use a formula in Excel to change it quicker.
The Excel sheet looks like this:
Search the Community for documents/discussions about "Ad-hoc report". You will find a lot of them, all variations on a theme explained quite well by Jennell McIntire in Customizable Straight Table