Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
hosasahana
Partner - Contributor III
Partner - Contributor III

How to change colour of bar according to the value compared with adjacent bar in Qliksense?

Hi all,

Request help in getting a logic for my development. 

I have a bar chart where x axis is month and there is each bar value calculated for every month, basically dimension is month and measure is an avg calculation. I want to change the colour of the bars to red and green according to a particular logic.  

if current month (Dec) >previous month (Nov) = green, else red 

if Nov >Oct = green else red.

Similarly for all months. Is this possible in Qliksense? if yes,please can you help?

hosasahana_0-1610516633393.png

Thanks,

Sahana

1 Solution

Accepted Solutions
Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Hi,

Use Color by Expression option, and expression:

If(avg(Value)>Above(avg(Value)), Green(), LightRed())

View solution in original post

3 Replies
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi, can anyone help on this issues please?

Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Hi,

Use Color by Expression option, and expression:

If(avg(Value)>Above(avg(Value)), Green(), LightRed())

hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi Zhandos,

Thankyou so much. Above function does the work. great!!