Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sagarrahul
Creator
Creator

date difference

in i want
current date subtract max date ie (current date - max date )
after that when it output arrives if the differnce between date is 1 day ie
eg (04-Feb-2016 - 03-Feb-2016) then i another column it should show difference as '1'and in another column its sholud its claim no difference
and its max date in another coulmn  .

CLM_INTIMATION_DATE

max date                 

claim no       current date
28-Jan-2016     28-Jan-2016RC-HS15-103357115/30/2016
03-Feb-2016     03-Feb-2016RC-HS15-103411395/30/2016
08-Mar-2016     08-Mar-2016RC-HS15-103433615/30/2016
22-Mar-2016     22-Mar-2016RC-HS15-103365295/30/2016
08-Feb-2016     08-Feb-2016RC-HS15-103365205/30/2016
08-Feb-2016     08-Feb-2016RC-HS15-103375265/30/2016
15-Feb-2016     22-Mar-2016RC-HS15-103433615/30/2016
11-Feb-2016     12-Feb-2016RR-HS15-103369405/30/2016
11-Feb-2016     13-Feb-2016RR-HS15-103369405/30/2016
      14-Feb-2016RR-HS15-103419785/30/2016
20-Jan-2016                           20-Jan-2016             RR-HS15-103412465/30/2016
09-Mar-2016                           09-Mar-2016             RR-HS15-103412465/30/2016
09-Mar-2016                             07-Mar-2016               RR-HS15-103412465/30/2016

so pls help me in this as soon as possible

15 Replies
mightyqlikers
Creator III
Creator III

hi

could you please share expected out put and input in excel..

$@M.

PrashantSangle

Hi,

try,

for date difference

If(interval(currentDate - maxDate,'D')>0,interval(currentDate - maxDate,'D'))

for Claim No

If(interval(currentDate - maxDate,'D')>0,ClaimNo)


If your date contain timestamp also then use floor() to round the date value


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sagarrahul
Creator
Creator
Author

thank u max dreamer for ur time and help to me .

u gave its work nicely but my work is half done

now i wnt this

current date - max date that is ( 31-May-2016 - 30-May-2016 ) so its comes 1 and difference is also 1

when difference comes to 1 it must show it max date and along with claim no

PrashantSangle

Where ?? in same column??

then

If(interval(currentDate - maxDate,'D')>0,

interval(currentDate - maxDate,'D')=1,

maxDate & ' - ' & ClaimNo,interval(currentDate - maxDate,'D')))


Note : might be I am missed some bracket or semicolon. Please correct it

But logic to achieve your requirement is identify where date difference is 1 if it is equal to 1 then

concatenate two value using & &

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sagarrahul
Creator
Creator
Author

no they are in different different column so now wht

and its not working properly

Kushal_Chawda

What if difference is 0 or >1?

sagarrahul
Creator
Creator
Author

dif  wil b one day day or more

PrashantSangle

Hi,

can tell us what is your expected output in provided sample data.??

So it will be easy to us to provide solution

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sagarrahul
Creator
Creator
Author

k will provide u