Skip to Content
0
Aug 18, 2023 at 05:39 PM

Data Action to Aggregate the members and then perform calculation on the aggregated members

94 Views

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.

image.png

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.

image.png

The calculation is as follows:

Old = Z - Sum of Old products.

New = Z- Sum of New products.

image.png

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

Attachments

image.png (4.8 kB)
image.png (3.4 kB)
image.png (5.6 kB)
image.png (6.1 kB)