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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
anandaqv
Contributor
Contributor

Date comparision based on User Entry

I have to compare 2 dates and get the result


User will enter the Date1  : 02/05/2018

   

EntryDate DueDateName
01/05/1802/03/18aaaaa
01/06/1802/06/18bbbb
01/15/1805/20/18cccc
01/30/1806/06/18ddddd
02/02/1808/07/18eeee
02/04/1806/22/18fffff
03/06/1805/02/18dsesd
05/06/1809/09/18mmmm
05/23/1801/04/19rrrrrr
06/22/1804/04/19ttttttt
06/25/1809/09/20ssssss

I have to find which name belongs to this below condition if the user enter the  Date1  : 02/05/2018

   

Entry Date <= Date 1
Due Date >= Date 1

   

what is the best way to handle.I tried with Getfield selection for capturing the user entry and compare the values .It didn't work.

Advance Thanks for your help.

3 Replies
afroz_shaik
Contributor III
Contributor III

Hi Ananda,

I am not sure of capability that user can enter data.

alternative will be in your script create a table(calendar) that has all the dates. Use a filter in front end give user a capability to enter or search date in there. make sure your Date column name in calendar table matches with your EntryDate.

Then Your KPI expression would be

if(GetCurrentSelections(EntryDate1)>=EntryDate1 and GetCurrentSelections(EntryDate1)<=DueDate1,Name,0)


may be it helps.

NZFei
Partner - Specialist
Partner - Specialist

Assume it is Sense, assume Date1 is a variable, press shift + drag your user field to the sheet, then edit the field to:

=if([EntryDate]<='$(Date1)' and [Due Date]>='$(Date1)',

    YourUserField

)

Fei

Anil_Babu_Samineni
MVP
MVP

Enter Means, From Input or Selection in the field?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful