Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
trishmre
Contributor II
Contributor II

COUNT DISTINCT NULL in left Join Table

How can I count distinct Open PR for PO Creation?

I have tried the count distinct and isnull PO. But till incorrect count.

This is left join table.

PO for creation.PNG

 

 

Labels (1)
1 Solution

Accepted Solutions
RsQK
Creator II
Creator II

Hi, this?

=COUNT({<PR*=E({<PO={"*"}>}),[PR Status]={'Open'}>}DISTINCT PR)

View solution in original post

6 Replies
justISO
Specialist
Specialist

Hi, not sure where you want to count this, in load script or report level, but as one of suggestion could be something like this:

count(distinct if (len(PO)>0, PO))

trishmre
Contributor II
Contributor II
Author

Hi

I am trying to have KPI chart, I need to count the NULL PO or PO =  '-' that has PR Status  equal to Open and distinct the PR.

 

justISO
Specialist
Specialist

Maybe this way:

count(distinct if ((len(PO)=0 or isnull(PO)) and [PR Status]='Open', PO))

trishmre
Contributor II
Contributor II
Author

trishmre_0-1648536609569.png

 

Not working, I am expecting to have number of PO.

I have already count of Open PR

=Count(distinct{<[PR Status]= {'Open'}>}PR)

I need to add condition to count the null PO for the Distinct PR column that has PR Status = 'Open'

 

 

 

 

RsQK
Creator II
Creator II

Hi, this?

=COUNT({<PR*=E({<PO={"*"}>}),[PR Status]={'Open'}>}DISTINCT PR)
trishmre
Contributor II
Contributor II
Author

It works! thank you. I appreciate your help.