Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

2 Replies
chematos
Specialist II
Specialist II

try this:

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

Regards

Not applicable
Author

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