Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vpanchuda
Contributor III
Contributor III

Qlik Sense Set expression

Hi Can any experts help me with below data.

I need the set expression to count the number of  A1,A2, and A3 and group it.

Condition

if Attendance is 'NO, and Grade is 'A1' and if date id blank count 1 

if Attendance is 'NO, and Grade is 'A2' and if date id blank count 1 

if Attendance is 'NO, and Grade is 'A3' and if date id blank count 1 

GradeAttendanceDate
A1NO01-02-2019
A2NO___
A3NO02-02-2019
A1NO___
A2NO04-02-2019
A3NO05-02-2019
7 Replies
sunny_talwar

So, based on this sample... you would want to see a count of 2?

vpanchuda
Contributor III
Contributor III
Author

 

Hi Sunny

It should count only if there is a corresponding date.(i think my question is confusing)

GradeAttendanceDate
A1NO01-02-2019
A2NO___
A3NO02-02-2019
A1NO___
A2NO04-02-2019
A3NO05-02-2019

 

My result table should be something line below.(it should not count if there is no date)

A11
A21
A32
sunny_talwar

This should work where Grade is a dimension

Count({<Attendance = {'No'}, Date = {"*"}>} Grade)

 

vpanchuda
Contributor III
Contributor III
Author

Hi Sunny Used -={""} and worked , only problem is if I show it in a Pivot the null values Shows (-) , is there any way to make it 0 instead?

sunny_talwar

May be uncheck 'Suppress Zero-Values'

vpanchuda
Contributor III
Contributor III
Author

I am not able to find this option in Pivot table in Qlik Sense

 

sunny_talwar

My bad, I was under the impression that you might be using QlikView... anyways I am not really sure what you have, would you be able to share a sample qvf to show the issue?