may be i am missing something here but why not put the if statement for background color of field 2?
if you want to change the color of Field2 column in your table, then the if statement for the color needs to be in the background color for that field...so click on the + sign to the left of Field2, double click on background color and put in the following expression:
if(isnull(Field1), rgb(150,150,150), white())
Using a If clause as you expect, we can use a flag to "mark" a possible grey color condition.
Insert this condition on your script:
If ( IsNull(FIELD1),1,0) as GreyColor
In your FIELD2, insert this condition for changing its color:
If (GreyColor = 1, QlikTechGray(), White())
You have many ways to do it, this is just one of them.
Thanks for the fast replies guys i really appreciate it.
@Jonathan Gegg: The red color was just an example
To elaborate further on what i want to do, because i think i was not clear, apologies for that.
- I have a data set which I've added a master calendar, but some dates don't have values from the original data set.
- I have created several list boxes: Year, Month, Week#, etc to precisely select a time period.
- When i select January, as an example, the impossible or null values get grayed out in the list box.
what i am trying to create is make the list boxes grey out values prior to a selection based on the null values in my data set.