Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
khadraouihiba02
Contributor III
Contributor III

How can I color negative values and positive values in QlikView?

Hello,

How can I color negative values red and positive values green in QlikView?

 

 

1.png

2.png

  

Labels (1)
16 Replies
saso70
Partner - Creator II
Partner - Creator II

Hi , click on + symbol next to expression 

saso70_0-1713527401233.png

 

saso70
Partner - Creator II
Partner - Creator II

expression will be something If([Column Name]<0, Red(), Green())

khadraouihiba02
Contributor III
Contributor III
Author

@saso70 I do this but it doesn't work

3.png

khadraouihiba02
Contributor III
Contributor III
Author

@saso70  the histogram change to red not the value

6.png

4.png

5.png

  

p_verkooijen
Partner - Specialist
Partner - Specialist

Hi @khadraouihiba02 


SUM([Columnname]) will not work as it is not a valid field.


1 If you reference the column use IF([EVOLUTION]<0, LightRed(), Green())

2 Otherwise use the Expression Definition

p_verkooijen_0-1713529896551.png

IF((N-(N_1)/(N_1)) < 0, LightRed(), Green())

 

3rd option is to use the Visual Queues (Couleurs) 
* only available for Straight table and Pivot

p_verkooijen_1-1713529999290.png

 

 

khadraouihiba02
Contributor III
Contributor III
Author

Hi, @p_verkooijen iit doesn't work

7.png

8.png

  

p_verkooijen
Partner - Specialist
Partner - Specialist

Hi @khadraouihiba02 

Quite hard to read your setup.
Try to switch to a straight table when creating measures to see the outcome instead of trying to build a visualization where you cannot see any data. 


U have 2 measures in place here, I guess the first Objectif creates the bars? 

The outcome EVOLUTION will not be more than 1? 

 

 

Also, you should always use aggregation functions in a measure definition, use SUM((N-(N_1)/(N_1))*100) 


Can you share a QlikView document with some anonymous data?

khadraouihiba02
Contributor III
Contributor III
Author

@p_verkooijen  Objectif is for the indicators

9.png

anat
Master
Master

anat_0-1713542997698.png

you can use expression text color

anat_1-1713543037972.png

 

anat_2-1713543057121.png