Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm working on Weighted accuracy and I'm stuck at this point.
The rolled up formula for weighted accuracy is correct. The error was on each individual item when you sum it up by product classification. But the problem is the weights are not applied at the lowest level, they are assigned only at the second level in hierarchy. Rollup formula is 1-((error/demand)*weight) and the formula for individual weighted accuracy calculation is (1-(error/demand))*weight.
The hierarchy is (Low to high):
Item
Fcst Product Classification - Weights are assigned at this level
Item Group
Category
Model
Division
Company
The expression works fine if Fcst Product classification is selected under dimensions. But it does not return any result when "Fcst product classification" is not selected. How do I get the weighted accuracy even when Fcst Product Classification is not selected under dimensions?
Any help would be appreciated.
Thanks,
Sangeetha
Not sure, but can you check the attached. It would be helpful if I knew what are the numbers that you expect to see.... but I guess this will help
This is the part which is the issue
If(Dimensionality() = 0,
1 -
Sum({<Flag_Type=>}Aggr((Sum({<Flag_Type=>}Aggr(fabs(Sum(FORECAST_QTY)-Sum({<Flag_Type=>}Demand)),Item)))/Sum({<Flag_Type=>}Demand)*
Pick(Match(only({<Flag_Type=>}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,
$(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy)),
[Fcst Product Classification])),
if( not SubStringCount(Concat('"'&_dimension&'"', '|'), '"Fcst Product Classification"'),
(1 -
Sum({<Flag_Type=>}Aggr(((Sum({<Flag_Type=>}Aggr(fabs(Sum(FORECAST_QTY)-Sum({<Flag_Type=>}Demand)),Item)))/Sum({<Flag_Type=>}Demand)),$(=Concat(DISTINCT '[' & _DIM & ']', ', ')&',[Fcst Product Classification]'))))*
Pick(Match(only({<Flag_Type=>}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,
$(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy)),
(1 -Sum({<Flag_Type=>}Aggr(((Sum({<Flag_Type=>}Aggr(fabs(Sum(FORECAST_QTY)-Sum({<Flag_Type=>}Demand)),Item)))/Sum({<Flag_Type=>}Demand)),$(=Concat(DISTINCT '[' & _DIM & ']', ', ')))))*
Pick(Match(only({<Flag_Type=>}[Fcst Product Classification]), 'High Revenue', 'Commodity', 'High Growth Potential', 'EOS Pending', 'Build to Order', 'Legacy') + 1, 0,
$(vHighRevenue), $(vCommodity), $(vHighGrowthPotential), $(vEOSPending), $(vBuildToOrder), $(vLegacy))))
I guess what are your expected output when you have only Division as a dimension?
I want weighted accuracy to return results on all possible dimension selections. The above expression works only when Fcst Product Classification is selected in addition to other dimensions.
Not sure, but can you check the attached. It would be helpful if I knew what are the numbers that you expect to see.... but I guess this will help
Thanks Sunny The expression works as expected.