Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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 (6)
1 Solution

Accepted Solutions
sunny_talwar

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

How about this

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

View solution in original post