Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
remo0017
Contributor II
Contributor II

If condition to check date greater than 3 years

Hi Everyone,

  I am new to Qliksense and I have a situation to set the colors on Qliksense map object based on Date

Visited_Date

01/29/2015

05/13/2017

01/017/2016

Need to set the colors based on expression the following conditions

If Visited_Date is greater than 3 years set the color to RED, if Visited_Date is less than 3 years set the color to Yellow ?

Could someone help me to write the correct if condition for this issue.

 

 

Labels (1)
2 Solutions

Accepted Solutions
settu_periasamy
Master III
Master III

May be try like

 

=if((Today()-VisitedDate )/365>3, Red(), if((Today()-VisitedDate )/365<=3, Yellow(),Green()))

View solution in original post

eduardo_dimperio
Specialist II
Specialist II

If((Interval(Today()-Visited_Date,'D')>1095,RED(),Yellow())

View solution in original post

2 Replies
settu_periasamy
Master III
Master III

May be try like

 

=if((Today()-VisitedDate )/365>3, Red(), if((Today()-VisitedDate )/365<=3, Yellow(),Green()))

eduardo_dimperio
Specialist II
Specialist II

If((Interval(Today()-Visited_Date,'D')>1095,RED(),Yellow())