I’m having trouble coming up with the DAX measure to determine the percentage difference between an item/store/date forecast value and the mean of past sales for the item/store combination.
As you can see, we have both past and future dates within the table (with past data points having SALES populated and future having FORECAST populated). In this situation, I’d like to have a measure that calculates the percentage difference of each future forecast to average sales and the item/store level.
For example, for the startdate of 9/30/20…
(1.79 - (0+0+2+15)/4) / (0+0+2+15)/4
(1.79 - 4.25) / 4.25 = -58%.
Sorry about that. I’ve updated the original post to be more clear. I’m basically trying to calculate percentage difference between future forecasts and recent sales to use for outlier detection criteria.
It was an interesting case and I am glad to know that it worked for you. I am just a learner and trying to learn from experts on this forum:slight_smile: