Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counts Expression

Hi Everyone,

I have a scenario where i need to show the records which are  Student  Status = Pass and i should exclude Phase = Absent. My Max Reporting date is November 11, 2015. Now i want  the students list who are pass before November 11, 2015.

Count({<[Student Status]={'Pass'},StartDate={'<$(=vMaxReportDate)'}, [Phase]-={'Absent'}> +

<[Student Status]={'Pass'},[Phase]-={'Absent'}, EndDate={'<$(=vMaxReportDate)'}>} Distinct [Student ID])

Thank You

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

You can try,

Count({<[Student Status]={'Pass'},StartDate={'<$(=vMaxReportDate)'},EndDate={'<$(=vMaxReportDate)'}, [Phase]-={'Absent'}>} Distinct [Student ID])


As already mentioned, your vMaxReportDate variable format should match with StartDate and end date fields.

View solution in original post

5 Replies
tamilarasu
Champion
Champion

Hi Jack,

Not sure what is your start date and end date. I assume you want the count of student ID's whose phase is not absent and enf date which is less than Report date. Check the below one.

Count({<[Student Status]={'Pass'},EndDate={'<$(=vMaxReportDate)'}, [Phase]-={'Absent''}>} Distinct [Student ID])


Also note your End Date field format should match with vMaxReportDate variable format.

Anonymous
Not applicable
Author

like this:


Let VPassDate=Date('November 11, 2015','DD/MMM/YYYY');


make sure PassedDateField should be in 'DD/MMM/YYYY' format..


=count({<StudentStatus={'Pass'}, Phase -={'Absent'}, PassedDateField={'<=$(=VPassDate)'} >} distinct StudentID)


Hope this will help!!

Not applicable
Author

Both my start and end date is less than November 11, 2015

tamilarasu
Champion
Champion

You can try,

Count({<[Student Status]={'Pass'},StartDate={'<$(=vMaxReportDate)'},EndDate={'<$(=vMaxReportDate)'}, [Phase]-={'Absent'}>} Distinct [Student ID])


As already mentioned, your vMaxReportDate variable format should match with StartDate and end date fields.

Not applicable
Author

try this


count({<StudentStatus={'Pass'}, Phase -={'Absent'}, Date={'<=$(=max(Date)'} >} distinct ID)