Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Master
Master

the best way of date comparison

Hi Folks, i got a question,

there are two date fields: confirmed date and scheduled date, they do look like:

confirmed date       scheduled date

03.10.2018                15.11.2018

01.12.2018                15.12.2018

03.12.2018                12.01.2019

my question is: how can i compare these dates,

confirmed date     scheduled date

03.12.2018                12.01.2019

one solution that i have found does look like:

(if(right(year(confirmed date),4) < right(year(scheduled date),4) , 1, 2 ) as flag  (here i compare two fields by using of function right() and year().

my question is, what if, if i should compare the date fields like:

confirmed date      scheduled date

03.10.2018                15. 11. 2018           (to compare between 2 Months)

01.12.2018                15.12.2018             (to compare within one Month)

 

Does anybody have any idea how to resolve this issue? Thanks a lot in advance

 

Beck

Labels (1)
10 Replies
Highlighted
Master
Master

Thanks a lot for your help and feedback