13 Replies Latest reply: Jul 24, 2014 8:24 AM by Андрей Шепель RSS

    Aggr max sales date with condition

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

      I have table with sales, divided by sales points.

       

      in first expression i calculate max date, where sales > 0

      max({<[Quantity]={">0"}>}Date)

       

      in second expression i calculate sales with date, where sales > 0

      sum({<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >}[Quantity])

      but in the second expression filter {<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >} is not aggregated by Spoints, it's the same for all of them.

       

      The necessary result for me:

      Sales for point 6 with 21.07.2014

      Sales for point 8 with 21.07.2014

      Sales for point 12 with 18.07.2014

       

      See attached file.

      Thank you!