9 Replies Latest reply: Nov 25, 2016 8:11 AM by Sunny Talwar RSS

    Sum if date equals max date

    S�lvia Ganh�o

      Hi guys,

       

      I'm back again

       

      See the attached app please.

       

      In Sheet A I have a table.

       

      My first problem was solved with this help   Re: Get Max Date Ignoring dimension

       

      Now I have another problem.

       

      Example of context:

       

      I have a store, and times to times I count all af my products, I do an inventory of my stock.

       

      so I have a count at 01-06-2016:

      product A - 15

      product B - 30

       

      And another count at day 30-06-2016

      Product A - 24

      Product B - 0

       

      so in my table I want my max date equals to 30-06-2016 (solved above)

       

      And sum of quantity for product A equal to 24 and for product B equal to 0

       

      Because at 30-06-2016 there was no stock for product B.

       

      Did you understand my problem?

       

      I'm trying this, but its not working :

      Sum({<RecordType={"Stocks"}, Date={"=$(=Date(Max(total <StoreCode, ProductCode> {<RecordType = {"Stocks"}>} Date), 'YYYY-MM-DD'))"}>} Quantity)

       

      Thanks in advance for any help.

       

      Regards,

      Sílvia