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

Help with Visual Cues Expression

Hi,

I am trying to use green, yellow, and red visual cues for a specific field. I need it to result as green when my field: Cont_Type is a certain number. The only thing I can get it to result back in is the normal field yellow.

This is what I have:

=if(left(Cont_Type,4)='40-H',66.99,if(left(Cont_Type,2)='20',26.99,if(left(Cont_Type,2)='40',56.99,if(left(Cont_Type,2)='45',76.99,if(left(Cont_Type,2)='53',100.99,)))))

I am not sure why this field will not return the correct coloring of green.

Any input would be greatly appreciated!

Thanks

7 Replies
Not applicable
Author

What are your conditions on visual ques? Can you post any sample?

Regards,

Kiran

Not applicable
Author

Under the Green field in visual cues I have:

=if(left(Cont_Type,4)='40-H',66.99,if(left(Cont_Type,2)='20',26.99,if(left(Cont_Type,2)='40',56.99,if(left(Cont_Type,2)='45',76.99,if(left(Cont_Type,2)='53',100.99,)))))

Under the Red field I have:

=if(left(Cont_Type,4)='40-H',65,if(left(Cont_Type,2)='40',55,if(left(Cont_Type,2)='20',25,if(left(Cont_Type,2)='45',76,if(left(Cont_Type,2)='53',99,)))))

For example, For the red field, when the left 2 characters of my field Cont_Type = 40 then I would like it to result in 55. So anything that is less than 55 should result in Red.

Not applicable
Author

Visual Ques will be applied on the expresssion based on its values. Can you give the expression on which you are having this?

Not applicable
Author

The expression it is going off of is:

sum(CBMs)/count(distinct Container)

which results in fields such as 55.46 or 62.16 etc.

Not applicable
Author

Your visual ques should look something like this.

Upper>= 60 Green.

Lower<= 55 Red.

So you need not have the entire expresssion in the visual ques. Just the values like 60, 55 is good enough.

The first check I would ask you to do is you can have these expressions in text boxes and check the values. These values will be used to apply the visual ques.

Regards,

Kiran.

Not applicable
Author

I need it for all my container types though. They all have different fields that they need to meet for the upper field and lower field. I wanted to have a pivot table instead of 5 or 6 different boxes for each container type.

I know it will work if I single them out, it just doesn't work with them all together.

Not applicable
Author

To all your expressions add the red, green expressions to the expression background as below:

If (<greencondition>,RGB(0,110,0),

If (<redcondition>,RGB(110,0,0),RGB(110,110,100))

Hope this helps.

Kiran.