Hi All,
I have the below expression which is used to calculate the Tail SKU. Can somebody pls explain about the expression mainly the script within the set expression.
=Count(DISTINCT
{$<Product = {"=Aggr(DISTINCT Sum({<DateKey={$(=Max({<TableType={1}>} DateKey))}>} ClosingStock) , ProductCode)>0.0001"}
*
{"=Aggr(DISTINCT Sum({$<DayNumber=,DateKey=,Year = ,Quarter = ,Period = ,Month = ,RollingMonth={'>=$(=Max(RollingMonth)-3)<=$(=Max(RollingMonth))'}>} SalesQty), ProductCode)<=0"}
*
{"=Aggr(DISTINCT Sum({$<DayNumber=,DateKey=,Year = ,Quarter = ,Period = ,Month = ,RollingMonth={'<$(=Max(RollingMonth)-3)'}>} SalesQty) , ProductCode)>0"}
*
{"=Aggr(DISTINCT Sum({<DateKey={$(=Max({<TableType={1}>} DateKey))}>} ClosingStock) <>
Sum({$<DayNumber=,DateKey=,Year = ,Quarter = ,Period = ,Month = ,RollingMonth={'>=$(=Max(RollingMonth)-3)<=$(=Max(RollingMonth))'}>} BatQuantity), ProductCode)"}>} ProductCode)
Thank you.
Regards,
Viresh