Skip to main content

Hi, 

I have the following challenge:

  • Metric 1. simple metric with sales forecast in units with one dimension only MONTH. So let’s say it is Jan: 20; Feb: 30; Mar: 20; Apr: 15
  • Metric 2. active orders already made e.g. 35 with no dimension at all, just one number. 
  • Now I need to adjust Metric 1 with Metric 2 applying the rule that earlier months are adjusted as first. I.e. adjusted forecast would be: Jan: 0; Feb: 15; Mar: 20; Apr: 15

How do I do it in Pigment? 

Regards,

Adam

Hi Adam,

To solve this, I think you can just use the PREVIOUS function. You would need to create a new Metric (let's call it Adjusted Forecast) with the same dimension as Metric 1 (MONTH). The formula for this new Metric would be something like: PREVIOUS(Month) - Metric 2, where Metric 2 is your active orders. This will subtract the active orders from the previous month's forecast.

However, please note that this will only work if Metric 2 is less than or equal to the forecast for the earliest month. If Metric 2 is greater than the forecast for the earliest month, you will need to adjust your formula to account for this.

You can read a bit more here: 

Let me know if you’re still stuck and I’ll try and help out further.


Reply