Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date calulation

I have a field called Target date

Target date

10/10/2017

Based on this date I need to calculate 3 more dates,

       executed date  - 60 days prior to Target date

·        Approved date  - 7 days prior  to executed  date

·        Selected date   - 45 days prior to Approved date

Here based on 10/10/2017,

Executed date would be - 8/10/2017

Approved date would be - 1/10/2017

Selected date would be  - 11/15/2016

How can I acheive this  ?

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Try this.

Date(TargetDate -60)  for Executed Date

Date(TargetDate -60 - 7) for Approved Date

Date(TargetDate -60 - 7 - 45) for Selected Date

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

4 Replies
m_woolf
Master II
Master II

Something like:

date(num([Target Date])-60) as [Execute Date],

date(num([Target Date])-67) as [Approved Date],

date(num([Target Date])-112) as [Selected Date],

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Try this.

Date(TargetDate -60)  for Executed Date

Date(TargetDate -60 - 7) for Approved Date

Date(TargetDate -60 - 7 - 45) for Selected Date

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thank you @kaushiksolanki

and @mw...

I used the belwo script and that worked.

Date(TargetDate -60)  as Executed Date

date(Date(TargetDate -60 )- 7) as Approved Date

date(date(Date(TargetDate -60 )- 7)- 45) as Selected Date

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Great,

Kindly mark answer as correct.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!