2 Replies Latest reply: Sep 10, 2012 1:48 AM by Animesh Bag RSS

    Problem in Count

      Dear Experts,

       

      I am encountering Problem in Count Function

       

      I have the Following Fields

      Field Name
      Description
      WerksPlant
      EBELNPO NO
      BANFNPR NO
      ANFNRRFQ NO
      EKORGPurchase ORG

       

       

      I am trying to count the NO. PO's which are made without Referencing PR and NO of POs made without Referencing RFQ

       

      and then I will find out % Non Complaince (PR) =( NO. of PO without PR)/ (Total No of PO) and similarly for RFQ

       

      In Expression I am restricting using following code "=count({<EKORG = {'serv'}>}distinct EBELN)" this is working

       

      but when I am using "=count({<EKORG = {'serv'}>}{<BANFN = {' '}>}distinct EBELN)" it is not working

       

      I am attaching the excel with the Example and Desired Result.

       

      Your Help will be highly appreciated

       

      Thanks and Regards,

      Animesh

        • Re: Problem in Count
          Jose Tos

          try this:

          count({<EKORG = {'serv'}, BANFN = {' '}>}distinct EBELN)

           

          Regards

            • Re: Problem in Count

              In my Query I had mentioned the Code which I had used in the expression

              "=count({<EKORG = {'serv'}>}{<BANFN = {' '}>}distinct EBELN)"

               

              for this to work I had to pass the Null Value and therefore I had to use the following code while loading the data from .QVD File

               

              If( Len( Trim( ANFNR ) ) > 0, ANFNR, '$(NullValue)' ) as ANFNR

               

              If( Len( Trim( BANFN ) ) > 0, BANFN, '$(NullValue)' ) as BANFN

               

              after using this the Results started coming correctly.

               

              With regards,

              Animesh