Hi,
Here is the scenario.
In my product dimension, I have some members and they are classified into two categories as "Old" and "New" as dimension property. Please refer below screenshot.

First, I want to aggregate the data based on their classification and then take the aggregated sum to perform the calculations. Please refer below screenshot for the sales data for the products.

The calculation is as follows:
Old = Z - Sum of Old products.
New = Z- Sum of New products.

I'm able to aggregate the data at "Old" and "New" but unable to perform the calculation. I'm writing this code where I'm facing issue for aggregation.
data(product = product.clasification) = resultlookup().
In the above code, I'm actually writing back the data at model but I don't want this to happen.
Is there a way to aggregate the data, perform the calculation without actually writing back the aggregated data in the model?
I'm thinking to create a variable member for product dimension, but I have two classification which would cause another issue.
Anyone who has faced similar problem or knows the workaround in this scenario. Their comments would be deeply appreciated.
Thanks