Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colour Code Expression Editor

I have derived a new field on the chart. I want colour code this based on the values of this field. I will need to write a condition stating 'If the value of this field > 5000, highlight with red. In the colour code expression editor, the derived field name does not appear to be used in the condition. Is there any function to express Value of the current field?

5 Replies
rupamjyotidas
Specialist
Specialist

Did you derived the field in Script ? or derived it in Chart.

If(Your conditions for Derived Field)>5000, Red()))

Not applicable
Author

It was in the chart.

Say my derived field name is 'Difference'.

I cannot use ' If (Difference > 5000, red()). The field 'Difference' does not show up as a Field in the expression editior.

I require a function to say If ({Current field value} > 5000, red()). I am asking if there is a function to fetch Current field value?

rupamjyotidas
Specialist
Specialist

Derived field in Chart won't be recognized as a Field, you need to defined it in Script. Or you can use the whole exp you used for deriving the field .

For Example

if you Difference filed is derived as Sales2016-Sales2015

Then

If((Sales2016-Sales2015)>5000,red())

Not applicable
Author

I was aware of this method. Not always the logic of derived fields would be simple. I am trying to avoid repeating the expansion of complex logic in multiple places.

rupamjyotidas
Specialist
Specialist

Then Define it in Variable or If possible in Script.