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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_skariah
Creator III
Creator III

Date Difference in Chart

Hi All,

Can anyone help to provide code for below scenario (refer Date Diff column).

Here I need the date difference of below below date with the above date.

   

GroupDateDate Diff
A1-Jul-1710.00
A11-Jul-176.00
A17-Jul-172.00
A19-Jul-170.00
B1-Aug-173.00
B4-Aug-179.00
B13-Aug-1710.00
B23-Aug-178.00
B31-Aug-170.00
C1-Jun-175.00
C6-Jun-1710.00
C16-Jun-173.00
C19-Jun-170.00

Regards,

Tom

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Alt(Below(Date) - Date, 0)

Capture.PNG

View solution in original post

10 Replies
sunny_talwar

Is this something you need in the script or front end chart?

arvind_patil
Partner - Specialist III
Partner - Specialist III

Dear Thomas,

you can not look forward you may refer this thread.

Peek next value in the row

Thanks,

Arvind Patil

prma7799
Master III
Master III

Like this?

Anil_Babu_Samineni

Why every month Last date showing Zero, The user want to close Monthly itself or any other logic ??

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
thomas_skariah
Creator III
Creator III
Author

Hi Sunny,

I need it at front end, not at back end.

Regards,

Tom

sunny_talwar

May be this

=Alt(Below(Date) - Date, 0)

Capture.PNG

thomas_skariah
Creator III
Creator III
Author

Thanks Sunny!!!

thomas_skariah
Creator III
Creator III
Author

Hi Sunny,

By adding an additional column the result shows as zero, chk below screenshot.

ASSS1-Jul-170
ASSS11-Jul-170
ASSS17-Jul-170
ASSS19-Jul-170
BSSS1-Aug-170
BSSS4-Aug-170
BSSS13-Aug-170
BSSS23-Aug-170
BSSS31-Aug-170
CSSS1-Jun-170
CSSS6-Jun-170
CSSS16-Jun-170
CSSS19-Jun-170

Regards,

Tom

sunny_talwar

What is the output you want here? May be try this

=Alt(Below(TOTAL Date) - Date, 0)