Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
taylor_jesse
Creator
Creator

Qlikview Background Color

Hi,

I am trying to set a back ground color for a date to turn yellow if its within two months but once the due date is past then I want it to turn white. I used the expression below but it stays yellow even if the date is past due.

For instance already past days are still yellow. I inserted the expression in the background color definition.

if([Contract Renewal Date]<=today()+ 60, Yellow(), White())

Thank you

6 Replies
prat1507
Specialist
Specialist

Maybe this


if([Contract Renewal Date]<=AddMonths(today(),-2), Yellow(), White())


Regards

Pratyush

YoussefBelloum
Champion
Champion

Hi,

try this:

if([Contract Renewal Date]<=Date(today()+ 60), Yellow(), White())

taylor_jesse
Creator
Creator
Author

I tried this expression and it didn't work out. It did not respond to the expression.

taylor_jesse
Creator
Creator
Author

Hi,

This expression works like my original expression. The background color works even for past dates. I only want it to work for upcoming dates that are 60 days away but once that date is past then the cell is suppose to turn white instead of yellow.

Thank you

YoussefBelloum
Champion
Champion

Is the format of your Date system variable (DateFormat) the same than the format of your field [Contract Renewal Date] ?

taylor_jesse
Creator
Creator
Author

Yes, I used Date#() in the script to change it to date format.