12 Replies Latest reply: Aug 6, 2014 5:44 AM by Андрей Шепель RSS

    max sales date

    Андрей Шепель

      Good day!

      I need to solve some problem.

      There is an example in xls file with necessary result

      I need to get sales with max date, where total sales for all SKU's in one Distributors > 0 (date must be the same for all SKU's for one distributors)

       

      expression, where i calculate sales with max date:

      FirstSortedValue(aggr(sum(Sales),Distributor_Name,SKU,Date),-aggr(max({<Sales={">0"}>}Дата),Distributor_Name,SKU,Date))

       

      expression, where i calculate max date, where sales > 0:

      max({<sales={">0"}>}Дата)

       

      but result is wrong...

       

       

      Thanks for all answers!