Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView Visual Cues Puzzle

I have a simple table chart. I am trying to set up Visual Cues so that the background will be Green for favorable conditions, and Red otherwise.

What determines favorable conditions is indicated by a field called IndicatorStatus, which can contain either 'Lower is Better' or 'Higher is Better'. These are the only two values, though obviously there can also be an indeterminate state, which I think is in play here.

Based on selections, the table will have a mixture of rows, some with the IndicatorStatus of 'Lower is Better' and others with 'Higher is Better'. Also, two other expressions, one for Benchmark and another for Value. It is the Value field that we are using Visual Cues for.

Visual Cues on this expression are defined:



Upper >= =avg({$<Sq={$(=Period2)}>} Benchmark)
Background: = if(IndicatorStatus = 'Lower IsBetter',lightred(),blue())
Lower <= =avg({$<Sq={$(=Period2)}>} Benchmark)
Background: = if(IndicatorStatus = 'Lower IsBetter',green(), black())



(In this example, I've used blue and black to represent the 'higher is better' condition because it makes the problem easier to see.)

When I have not made a selection on IndicatorStatus, and the dataset contains a mixture of 'Higher is Better' and 'Lower is Better' conditions, the Visual Cues does not work as expected. I expected that since each aggregate row must have a single value for Indicator Status, (it is a dimension of the table) then it would KNOW this value in the Visual Cues expression, but this IS NOT the case.

If IndicatorStatus is not selected, then the value in the Visual Cue is unknown, so even though the dimension clearly shows 'Lower is Better' it is taking the 'false' path of the if function (that is, it doesn't see the value).

This is resulting in the values changing background colors back and forth as the selection is made.


What I want is to have the Visual Cues KNOW the value for the current row, the same way it know the Value and Benchmark fields.

Help me, QlikView Community. You're my only hope. [:^)]

1 Solution

Accepted Solutions
dirk_konings
Creator III
Creator III

HI,

If you use Text Color or Background Color on the expression (+), you have the same functionality as in Visual Cue.

This is what i added on background color:



if

(Behaald > NormROOD, RGB(255,128,128), if(Behaald < NormGROEN, RGB(128,255,0), RGB(255,190,125

)))





View solution in original post

2 Replies
dirk_konings
Creator III
Creator III

I have a similar problem. Could anybody help ??

Visual cues depending on a value of a field, over 2 dimensions. Expression is just the value of an other field.

Fields :

Dim1

Dim2

Value

Red

Green

dirk_konings
Creator III
Creator III

HI,

If you use Text Color or Background Color on the expression (+), you have the same functionality as in Visual Cue.

This is what i added on background color:



if

(Behaald > NormROOD, RGB(255,128,128), if(Behaald < NormGROEN, RGB(128,255,0), RGB(255,190,125

)))