Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Problem with if condition and comparison dates

Hello.

I have the following formula in the background color of a field dimension

=if(COMPANY_CODE='01',argb(150,255,128,0),

IF(COMPANY_CODE=02 and CREATION_DATE<=$(UDATE),argb(150,128,255,128),

if(COMPANY_CODE='02',argb(255,255,255,255),

if(COMPANY_CODE='03',argb(150,0,101,179),

if(COMPANY_CODE='04',argb(150,100,177,255))))))

unfortunately the the comparison of the date CREATION_DATE<=$(UDATE) does not work.

Any help ?

Thank you in advance.

2 Replies
geogou1973
Creator
Creator
Author

i found that the CREATION_DATE<=$(UDATE) need  '  like CREATION_DATE<='$(UDATE)'

vishsaggi
Champion III
Champion III

What is the date format of your CREATION_DATE field and in your variable $(UDATE).

DId you try giving single quotes around your variable as you mentioned like '$(UDATE)' ?