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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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)