5 Replies Latest reply: Oct 5, 2017 12:08 PM by Anand Chouhan RSS

    how to get min date

    naveen kumar

      Hi All, Can any one suggestion me what i am missing in below expression....

       

                        sum(aggr(Min({<BVALIDFROM = {"$(=Date(Min(BVALIDFROM)))"}>}BPrice),p_Material,V_Code))

       

      what i am trying to get is ,when a fiscal year is selected so i need to select min date from BVALIDFROM and if min date has more then one bprice then select min bprice value .

       

      But by the above expression i am getting zero as out put ...

       

      When i remove BVALIDFROM = {"$(=Date(Min(BVALIDFROM)))"} i am getting output

       

      sum(aggr(Min(BPrice),p_Material,V_Code))


      but the above expression is not a valid one because there is no guarantee  whether it will pick min date VALIDFROM or not ..

       

      i strongly believe the error is in this BVALIDFROM = {"$(=Date(Min(BVALIDFROM)))"} am i missing

       

      My BVALIDFROM format is

      Capture.PNG