Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mla3eruva
Contributor III
Contributor III

Hide row or set to Null based on multiple criteria (Max(Aggr(Count))

We have a report with class grade distributions - the rules are that we cannot show class grade distribution if class size is less than 10 OR if only two grades were assigned and only one person received one of the two grades (on the assumption that that person would know that everyone else got an A when they got a D for example).

Here is a sample of the pivot chart:

 
 Grade Distribution   
ClassTotalABC 
1003510205Display this row
2007232Hide or show Nulls:  N <=10
300161150Hide or show Nulls:  Only 2 Grades and n = 1 for one of the grades 

 

My Expression is as follows:

if((Count(Total <[Class]> [Student_ID]) <= 10)
OR
(count(Total <[Class]> [Student_ID]) -
max(Aggr(Count([Student_ID]), [Class], [Grade])) = 1
),
Null(), count([Student_ID])
)

 

Which results in this (close but not quite there):

Current Results   
 Grade Distribution  
ClassTotalABC
1003510205
200    
300-1--

 

Any suggestions on how I can get that A in class 300 set to NULL as well?


Thanks in Advance

Labels (1)
2 Replies
anushree1
Specialist II
Specialist II

Please check the attached, not sure if this is what you asked for

 

mla3eruva
Contributor III
Contributor III
Author

Thanks, but that's not quite it.    Grades is a field with values of A, B, C, etc including A+, A-, etc.   A, B, C are not separate fields.