Skip to main content

Hi!

I have a sales volumes metric with dimensions Category, Channel, Product and Month.

Data was imported from a transaction list.

I want to adjust this with some volumes that are manually input by user per channel, but I want to spread this values on every product using the same weighted distribution per category and month as the initial data. For example, if on month Jun, on a product, the volume was 15% of the total, I want to add on that product for Jun 15% of the manually added volume.

How do I achieve that?

Thanks in advance!

Pigment’s dimensionality helps a lot with this kind of calculation. Try creating three metrics:

First, one metric that calculates the percent of the product’s mix of total product volume by each dimension:
Sales_volume / Sales_volumelremove: Product]

Second, a metric that takes your user input on the n number of dimensions to the same dimensions as the initial data. So if the user inputs only on the channel, you can spread that value across all applicable dimensions using a gby constant:] allocation.
User_inputnby constant: Category, Product, Month]
If the user input is on channel per month, you would just remove the Month dimension from the allocation above, etc.

And the last metric, which multiples the above two metrics (which now have the same metric structure of four dimensions).


Reply