Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
mahitham
Contributor

Date difference in weeks

Hi Experts,

Can any one please help me on below requirement.  I have two date fields like Add Date and [last date of CM]. From these two dates please help me derive the Date difference in Weeks.

Date difference in weeks.png

 

Thanks in advance

2 Replies
Highlighted
shiveshsingh
Honored Contributor

Re: Date difference in weeks

Try This

 

=Date(Add Date-[last date of CM],'DD')/7

MVP
MVP

Re: Date difference in weeks

You don't need the Date() function here. It is simply a format function.

To round to nearest integer:

=Round((Add Date-[last date of CM])/7)

Or to include the partial week:

=Ceil((Add Date-[last date of CM])/7)

Or to include only complete weeks:

=Floor((Add Date-[last date of CM])/7)

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein