Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
hope this it:
=if([Contract Renewal Date] >= Today() and [Contract Renewal Date] <= addmonths(Today(),6), LightRed(), White())
Make sure the field [Contract Renewal Date] actually contains date values and not just strings that only look like dates. You can use the date# function in the script to turn string values into date values. Feel free to post a small example demonstrating the problem if you get stuck.
Hi,
I added date() to the contract renewal date field but still getting the same result
I did
Date([Contract Renewal Date]) as [Contract Renewal Date].
Do you think maybe something needs to be aded to the expression so that when the date passes the yellow background color turns off?
Thank you
The date() function only applies a format to a value. The date#() function can turn text values into date values.
Good morning,
Changing adding date#() removed all the values in the cell. Do you think an expression can be written to make this change?
Thank you
Have you read the online help about the date#() function?
If not, have a look at https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/Interpretation...
Of course, it could be another problem altogether. Can you post a small example qlikview document that shows the problem?
Please see the image below. The first date with yellow is now a past date and the background color still remains.
Hi,
=if(rangesum(before( YourExpression , 0, columno() )) = 0, yellow() )
HTH
André Gomes
Hi,
Do you mean column() or columno?
Thank you