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: 
charlesdmeyer
Contributor
Contributor

Count a count

I am working on some data about our student body.  I used formula this to determine the number of failing grades that each student has:  count({<[Current Grade]={"<70%"}>}[Student ID]) and it is accurate.

Now I want a count of the number of students who have four failures based on the count from the formula, three failures, etc.

I have tried Aggr, but I might be doing it wrong.

Any help is greatly appreciated.

 

C

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

@charlesdmeyer  may be this for four failure. you can then adjust accordingly 

= Count({<[Student ID] ={"=count({<[Current Grade]={'<70%'}>}[Student ID])<5 "}>}[Student ID])

Updated expression with single quotes inside inner set

 

View solution in original post

3 Replies
Kushal_Chawda
MVP
MVP

@charlesdmeyer  may be this for four failure. you can then adjust accordingly 

= Count({<[Student ID] ={"=count({<[Current Grade]={'<70%'}>}[Student ID])<5 "}>}[Student ID])

Updated expression with single quotes inside inner set

 

edwin
Master II
Master II

one simple way is to use an if statement:

if(count({<[Current Grade]={"<70%"}>}[Student ID])>=4,1)

if there is no filtering required, you can add the aggregation in your script - create a field with count or grades <70% and you can use that in your expression

count({<Failures={">=4"}>}StudentID)

edwin
Master II
Master II

hope that helps or at least points you to rt/alternative direction