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: 
abhaysingh
Specialist II
Specialist II

Scenario Logic Help

Hi All,

I have two tables Community Test Data Assign and Community Test Data Assign. there are link on the basis of Visit ID,

In assign Table i have Date Submitted Field and in Visit Table i have Date Due field.

I need to calculate below 3 Logic..

1. AssignmentsCompletedCount =  count of DateSubmitted >= startDate And DateSubmitted <= endDate and DateSubmitted <= Visit.DateDue

2. AssignmentsSubmittedLateCount = Count of DateSubmitted >= startDate And DateSubmitted <= endDate and DateSubmitted > Visit.DateDue

3. AssignmentsOverdueCount = Count of Visit.DateDue + Visit.GracePeriod >= startDate && Visit.DateDue + Visit.GracePeriod <= endDate && DateSubmitted == null

Start Date and End Date user will enter..

I need the count of Assignment Completed, Assignement Submitted late, Assignment Overdue in Pie chart..

Can any one help me in this??

thanks

12 Replies
abhaysingh
Specialist II
Specialist II
Author

Pls revert..thanks

abhaysingh
Specialist II
Specialist II
Author

hey guys any one pls suggest??

Anonymous
Not applicable

Is this flag IsDeleted useful for this?

abhaysingh
Specialist II
Specialist II
Author

if(AssignmentTask = 'Completed' ,  count({<  DateSubmitted = {'>=$(=vStartDate)  <=$(=vEndDate)'} >} AssignmentTask),

if(AssignmentTask = 'Submitted Late' ,  count({<  DateSubmitted = {'>=$(=vStartDate)  <=$(=vEndDate)'} >} AssignmentTask),

if(AssignmentTask = 'Assingment Overdue' ,  count({<  AssmntOverdueDate = {'>=$(=vStartDate)  <=$(=vEndDate)'} >} AssignmentTask))))

abhaysingh
Specialist II
Specialist II
Author

yes False or null to be pick

Anonymous
Not applicable

Abhay,

As per this logic

if(num(DateSubmitted)<=num(DateDue),'Completed',

if(num(DateSubmitted)>num(DateDue),'SubmittedLate',

if(IsNull(num(DateSubmitted)),'Overdue'))) as AssignmentStatus,

No null values in case of Overdue...

Tell me what expression you are using now with these status?

Does I need to create grace period as well? On what basis you are creating grace period?

Anonymous
Not applicable

oky, share your expression

Anonymous
Not applicable

Got it.

Now if your Overdue is not matching then check the joining part of the table whether it wud be outer or right or left...

as your completed and late status task are matching.

Anonymous
Not applicable

I am creating some null values for overdue and wud be sharing with you in a while...