Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vireshkolagimat
Creator III
Creator III

Calculate Tail SKU

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

0 Replies