Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

default color in the background color expression

Hello,

I have done a example of my problem in the QlikView application. For information, my real application contains a lot more of value in the fields.

- I have a sector chart with a drill down group (2 dimensions, Country and City)

- I would like to specify a color for the Country field and that QlikView takes me the default color for the City field

- In the background color expression, i've wrote =if(GetCurrentField(Geography) = 'Country',RGB(R,G,B),'')

- The colors works for Country but City is in black because he doesn't know what to do for the City field

- The problem is that I don't know how to say in my expression "else put me the default QlikView color" (I have wrote '' for the moment)

If you have any idea, I would be pleased to hear it

Anthony

5 Replies
Not applicable
Author

Hi Anthony,

Well QlikView is doing exactly wht its supposed to do, infact more than that.

in the background color, wen you specify the color for country it picks it, but where it is city u leave the option/value blank(aka NULL) and wht QlikView does is it converts the NULL value to RGB(0,0,0) (aka BLACK).. thats y city is being shown as black.

you need to specify the RGB color code(default Qlikview color in your case) in the second expression.

there is no way for qlikview to look into default color set if you specify a color in the background color specification/

Hope this helps.

rgrds, Abhinava

Message was edited by: Abhinava Chandra

Not applicable
Author

The problem is that there is actually a lot of cities and I can't specify a color for each one especially that the colours that propose QlikView are very nice.

Does it mean that if i want to use specific colors I have to do it for all the fields I use? Which would make my problem impossible to solve...

Not applicable
Author

Hi Anthony,

you can achieve the desired effect by "NOT" specifying any background color specification for the expression.

QlikVIew will use the default colours for displaying data according to country or city, whichever level you view the data.

Just remove the background color expression...

Cheers,

Abhinava

Not applicable
Author

I think I have the same issue as Anthony - I have one value that MUST be a unique colour ("Vivid") and the rest need to use the persistent color palette.

It looks as though QlikView allocates the persistent color to a field based on load order. If there is a way to get the load order attribute in an expression then I could use the following expression for the background color:

if(Provider='Vivid',RGB(200,0,0),Color(___________))

where ________ is Provider.loadOrder

Is there anyway to use a field's attributes like this?

Cheers,

Pete

Not applicable
Author

Hello all,

are there any new ideas on that?

We have the same issue:

In a Line-Chart we use an expression-backgroundcolor:

if(MyField='A',RGB(red,green,blue))

So if MyField is different from A, the expression returns NULL, and QV uses the standard color palette.

This works in Line Charts.

Unfortunately QV's behavior does not seem to be consistent, as in Pie-Charts the result NULL produces black sectors (NULL=>0).

Any thoughts on that? Any way to circumvent the behavior in Pie-Charts?

(The one solution to provide color codes for all possible values in MyField is not an option).

Thanks for any idea,

Thilo

PS: QV11SR1