2 Replies Latest reply: Jun 22, 2013 12:28 AM by Deepak Kumar RSS

    Expression Issue

    Deepak Kumar

      Dear All,

       

      I am Facing one Issue. I want  Year on Year Compariosn using below Expression. But i donot know where i Have to put the Current Year Variable Now i put the condition in above four lines but the output is coming zero.

       

      Can any one tell for this kind of Expression where i have to put the Year Condition.

       

       

       

      (

      Num((Sum({<FiscalYear={"$(vCurrentYear)"},Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} RecievedQty)

      +Sum({<FiscalYear={"$(vCurrentYear)"},Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} WH_RecievedQty)

      +Sum({<FiscalYear={"$(vCurrentYear)"},Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} IssuedQty)

      +Sum({<FiscalYear={"$(vCurrentYear)"},Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} WH_IssuedQty)),'##0.00'))

      +

      Num((

      sum(RecievedQty)+Sum(WH_RecievedQty)

      +

      sum(IssuedQty)+Sum(WH_IssuedQty)

      ),'##0.00')

      /QDenoNum

       

       

      Thanks,

      Regards

      Deepak

        • Re: Expression Issue

          Hi

           

          Pls Take from ur database Date Field [DD/MM/YYYY]

          Left(Date(Date#(TRANDATE,'DD/MM/YYYY'),'YYYY MMM'),4) as Year,

          ·     

          SET vMaxYear=MAX(Year)

           

          = Num(Sum({<Year={$(vMaxYear)}>}RecievedQty)+

          Sum({<Year={$(vMaxYear)}>}WH_RecievedQty)

          +

          Sum({<Year={$(vMaxYear)}>}IssuedQty)+

          Sum({<Year={$(vMaxYear)}>}WH_IssuedQty)

           

          ,'####.#')

           

          Regards-Bika

          +

            • Re: Expression Issue
              Deepak Kumar

              Hi Bika,

               

              Thanks for Reply Bika,I put the Year Condition in Expression where you said in the above Post.

              I wrote the Expression below u can see but Issue was that when there was no selection it showing the wrong Value when we do the Year Selection it shows the Value  one more thing without selection it shows only current Year Data.

              I am showing Current Year  vs Previous Year.

               

              Num((Sum({<FiscalYear=,Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} RecievedQty)

              +

              Num((Sum({<FiscalYear=,Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} WH_RecievedQty)


              +

              Num((Sum({<FiscalYear=,Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} IssuedQty)

              +

              Num((Sum({<FiscalYear=,Month=,Quarter=,Day=,NumTransDate={"<$(vMinDate)"}>} WH_IssuedQty)

              +

               

              Num(Sum({<Year={$(vMaxYear)}>}RecievedQty)+

              Sum({<Year={$(vMaxYear)}>}WH_RecievedQty)

              +

              Sum({<Year={$(vMaxYear)}>}IssuedQty)+

              Sum({<Year={$(vMaxYear)}>}WH_IssuedQty)

               

              ,'####.#')

               

               

              Regards

              Deepak