Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
scott_brown
Contributor III
Contributor III

Using Max, Aggr, and Count together

Having trouble with the following expression. 

=count(distinct if(max(aggr(count(distinct EDI_UPC),PO#,EDI_CARTON_NUMBER))=1,PO#))

I'm attempting to count the number of PO#'s that have a maximum of 1 EDI_UPC in any EDI_CARTON_NUMBER.

This portion of the expression is working fine:

=max(aggr(count(distinct EDI_UPC),PO#,EDI_CARTON_NUMBER))

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

How about this

=Count(DISTINCT {<[PO#] = {"=Max(Aggr(Count(DISTINCT EDI_UPC), PO#, EDI_CARTON_NUMBER)) = 1"}>} [PO#])

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

How about this

=Count(DISTINCT {<[PO#] = {"=Max(Aggr(Count(DISTINCT EDI_UPC), PO#, EDI_CARTON_NUMBER)) = 1"}>} [PO#])