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

Dynamically Changing the colour of the dimension axis label

I have two tables that show some values, for example

Table 1 - Stats           Table 2 - Current People

Name       Qty                   Name      Current

Mr Blog     50                   Mr Blog         1

Mrs Blog   10                   Ms Blog         1            

Ms Blog     25

I want the Graph to show the label text colour to Green if they are current and orange if they are not, for example

Qlikview Blog Chart.bmp

I used the Axis Font Colour to have the following formula:

 

IF(Sum (Current)>0, RGB(24,117,11),RGB(241,111,14))

But this only does the colour for the whole graph, not for each individual bar.

How do I make it work for each bar?

1 Solution

Accepted Solutions
whiteline
Master II
Master II

I think the custom color expression for the font of the axis labels is calculated once.

Also, it likely neglects chart dimensions.

So, unfortunately, you have to use another tools to provide this info to user.

View solution in original post

14 Replies
Gabriel
Partner - Specialist III
Partner - Specialist III

Hi Andre,

Can I ask, what version of QlikView you are using? Is it v10 or v11?

Regards,

Gabriel

Not applicable
Author

Good question, I should of stated sorry. I am using v10.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi Andre,

Go to Expression tab, click the + sign from the graph and to Backround colour then enter the fomula below. Please note I haven't test this formula.

IF($(current) =1,RGB(24,117,11),RGB(24,111,14))

Not applicable
Author

Thanks Gabriel,

Unfortunately it did not work Gabriel, the colour did not change at all

(to either options)

Andrew Sheward

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi Andre,

I figure this out, even though I am using v11.

This is the expression for it:

=if(Current =1,RGB(24,117,11),RGB(241,111,14))

Also if you change the = to >0 it works perfectly well.

Let me know if this is helpful.

Not applicable
Author

Sorry Gabriel, my original question was to change the colour of the

label, not the colour of the bar itself, in my work I have a stacked bar

so I do not want to change the colour of the bar, I wanted to change the

colour of the label.

Gabriel
Partner - Specialist III
Partner - Specialist III

One more thing is to go to presentation, click on Legend Setting, Click on Font, click on Calculate and enter

=if(Current =1,RGB(24,117,11),RGB(241,111,14)).

Let me know if this is helpful

Not applicable
Author

Sorry Gabriel, I am trying to alter the label of the bar, not the

legend.

I have used the formula in the label font colour calculation but it does

not action the formula for each bar, it only does the colour of the

label as a whole

Andrew Sheward

Gabriel
Partner - Specialist III
Partner - Specialist III

Ok watch this clip and let me know

http://qlikshare.com/328