Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

Pivot table count on condition

I have following kind of table

SchoolSubjectStudentsGrades
ABCMathab0
ABCMathac12
ABCMathad32
ABDMathae1
BBEnglishuu44
BBEnglishud0
BBEnglishua

33

I want to create pivot table like below

  

SchoolSubjectCount with Grades > 0Count with all grades
ABCMath34
BBEnglish23

How can i achive above pivot tables.

1 Solution

Accepted Solutions
prat1507
Specialist
Specialist

Hi

PFA the .qvw for your reference.

Regards

Pratyush

View solution in original post

4 Replies
prat1507
Specialist
Specialist

Hi

PFA the .qvw for your reference.

Regards

Pratyush

jonathandienst
Partner - Champion III
Partner - Champion III

Simple set expression:

=Count({<Grades = {">0"}>} Students)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
userid128223
Creator
Creator
Author

Thanks to both of you.

Another quick question. In my pivot i am getting counts correctly however i have some blank data which is also getting count and i want to keep it that way. However i was wondering if i can label empty field as "BLANKS"

prat1507
Specialist
Specialist

Just add to your dimension where you're getting blank as if(Dimension='','BLANKS',Dimension)