I have been fighting with drill through processes for a while and I don't manage to get my head around the efficient way of setting dynamic rows and columns on my target view.
To be more precise, I don't manage to understand how to recycle the dynamic subsets that I build for rows and columns.
I have set up several drill process within the same cube for different axis. i.e. by Account, by Location, by Week...
The idea was to give the ability to users to drill quickly from standard DBRW reports that we have set up and investigate lower levels details from a right click / drill.
All the title dimensions that I have set when creating my target view get the relevant selection through the drill process as it is done automatically when setting up the drill through.
The part I am struggling with is the configuration of the dimensions/subsets that I want to set as row and columns in the target view.
In Rows, I want to set the axis which is drilled through.
if I drill on Accounts and the selected Account is "Total Revenue",
I want the account dimension to be in rows starting from "Total Revenue" and expended to the lowest level.
In Columns, I want to set up a list of weeks based on the week selected when drilling. ( Last 5 weeks).
I thought it would be easily achieved using dynamic subsets and then ViewSubsetAssign, ViewRowDimensionSet and ViewColumnDimensionSet.
For the Row and Column dimensions, I have simply set up a MDX based subset.
When I run using this configuration, on the first execution, everything is working exactly as expected !

When running a second time, with the original code, I have an error (expected) as subsets assigned to columns and rows already exists and therefore they can not be simply "created".
This makes perfect sense to me so I understood that we need to manage the recycling/update of these subsets.
That is where I start to loose my marble when trying to manipulate this in the drill process.

In the drill process when trying to delete these subsets in my Prolog, I hit an error as the subset is used in a view and cannot be deleted.
So far so good, I can understand the issue as well. ( the error state actually the very problem so nothing to argue about...)
I then tried to destroy and recreate the view within the prolog but with no success.
I can see the difference between Zero Out and Drill in that we effectively use the view after it is generated by the process therefore cleaning up in the Epilog is not an option.
I tried to delete the view and then recreate it within the prolog, the subsets used previously in rows or columns can not be deleted and the message is always "Subset "Bla" is used in a view and cannot be deleted".
I also tried to assign a temporary subset so I could delete the previous one but without any chance.
This error even persists when I assign manually different subsets to rows and columns to the view and run the drill process again.
I would really appreciate if somebody could point me in the right direction on how to handle these columns and rows dynamic subsets in a drill process.
Kind Regards,