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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Scenario Help.

Hi All,

i have one table in which there is SurveyTaskId,DateDue and Datesubmitted field

IF(DateSubmitted <= DateDue,   'Completed on time',

   IF(DateSubmitted > DateDue , 'Submitted Late',

       IF(ISNULL(DateSubmitted) OR LEN(DateSubmitted) = 0, 'OverDue')))  AS [TaskStatus],

right now my master calender is working on Date Submitted, so when i am selecting year, Completing on time and Submitted date are coming but overdue is not bcoz they are nulls i think.. how i can do this?

Ouput, Overdue should Also come when i m selecting any year

Regards

ABy

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Ok, I have not seen that you were in the script.

So, you can add a new field DateReported like this:

if(ISNULL(DateSubmitted),DateDue,DateSubmitted) as DateReported

Then you base your calendar on this field instead of DateSubmitted.

And maybe also in your TaskStatus expression start to test if DateSubmitted is NULL first:

IF(ISNULL(DateSubmitted) OR LEN(DateSubmitted) = 0, 'OverDue',
IF(DateSubmitted <= DateDue, 'Completed on time',
IF(DateSubmitted > DateDue , 'Submitted Late')))  AS [TaskStatus];

View solution in original post

14 Replies
tamilarasu
Champion
Champion

Hi abhay,

Try something like,

IF(DateSubmitted <= DateDue,  'Completed on time',

  IF(DateSubmitted > DateDue , 'Submitted Late',

      IF( LEN(Trim(DateSubmitted)) = 0, 'OverDue')))  AS [TaskStatus],

Let me know,

abhaysingh
Specialist II
Specialist II
Author

thanks for revert, This is some logic is working...

i want below

right now my master calender is working on Date Submitted, so when i am selecting year, Completing on time and Submitted date are coming but overdue is not bcoz they are nulls i think.. how i can do this?

Ouput= Overdue should Also come when i m selecting any year

thanks

vincent_ardiet
Specialist
Specialist

Hi Abhay,

Can you explain us your datamodel or give a screenshot of it?

You issue is maybe link to the way your data are organized.

Regards

Vincent

tamilarasu
Champion
Champion

You are using DateSubmitted as your master calendar field. If DateSubmitted field is blank, you can not see the Overdue when you click any year. Do you have any blank cells in master calendar? Could you post your application.? 

Ouput= Overdue should Also come when i m selecting any year

thanks

Also, you have mentioned that the overdue should display for any year. I don't understand the concept here. Please elaborate.

abhaysingh
Specialist II
Specialist II
Author

Hi Vincent,

this is only one table.. no other table in data model


i Tamil Nagaraj,

yes right and concept is in Datesubmit there are null dates as well, or if i m not selecting any date than as on overdue task are showing.. but i want when i select any calendar year created from datesubmitted overdue also come..


Sorry i can't post the Sample App.


Thanks

Mark_Little
Luminary
Luminary

HI,

Maybe, add today as date submitted for the one that don't have a date, but after you apply the above logic, use a proceeding load.

Then you can use your TaskStatus flag to exclude the overdue one when you don't want to see them?

Mark

tamilarasu
Champion
Champion

Then you need to create a dummy date for the blank cells. But I don't think this is a good idea. You need to modify your data model and need logic.

vincent_ardiet
Specialist
Specialist

How do you use your expression?

In a straight table?

What are the dimensions you are using?

Anonymous
Not applicable

can we try sth like:

=count({<Status={'Overdue'}, Year={'=$(=year(DueDate))'>} SurveytaskID)  //Correct syntax if required