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)
1 Solution

Accepted Solutions
muhammadrauf
Contributor II
Contributor II

  1. Open your QlikView application and go to the chart object (e.g., straight table, pivot table, bar chart) where you want to apply the coloring.

  2. Right-click on the chart object and select "Properties."

  3. In the Properties window, navigate to the "Expressions" tab.

  4. Select the expression for which you want to apply conditional formatting (e.g., the expression representing your numerical data).

  5. Click on the "+" icon next to the expression to expand the options.

  6. Under "Background Color" or "Text Color" (depending on whether you want to color the background or the text of the values), click on the expression editor button (usually denoted by an "fx" icon).

  7. In the expression editor, enter the following formula to specify the color:

    scss
    =if(YourExpression >= 0, LightGreen(), LightRed())

    Replace "YourExpression" with your actual expression representing the numerical data.

    This formula checks if the value is greater than or equal to zero. If it is, it applies a light green color (or any other color you prefer for positive values). If the value is negative, it applies a light red color (or any other color you prefer for negative values).

  8. Click "OK" to close the expression editor and then click "OK" again to close the Properties window  Ionic foot bath made in Canada  .

Your positive values should now be displayed in one color (e.g., light green) and negative values in another color (e.g., light red) within your QlikView chart. Adjust the colors and conditions as needed to suit your visualization preferences.

View solution in original post

3 Replies
Lisa_P
Employee
Employee

On the Expressions tab, if you expand the expression (click +)another menu appears ...

Lisa_P_0-1713570891228.png

Use the Background Color and write a logical conditional expression

eg. IF(EVOLUTION>0, green(), red())

muhammadrauf
Contributor II
Contributor II

  1. Open your QlikView application and go to the chart object (e.g., straight table, pivot table, bar chart) where you want to apply the coloring.

  2. Right-click on the chart object and select "Properties."

  3. In the Properties window, navigate to the "Expressions" tab.

  4. Select the expression for which you want to apply conditional formatting (e.g., the expression representing your numerical data).

  5. Click on the "+" icon next to the expression to expand the options.

  6. Under "Background Color" or "Text Color" (depending on whether you want to color the background or the text of the values), click on the expression editor button (usually denoted by an "fx" icon).

  7. In the expression editor, enter the following formula to specify the color:

    scss
    =if(YourExpression >= 0, LightGreen(), LightRed())

    Replace "YourExpression" with your actual expression representing the numerical data.

    This formula checks if the value is greater than or equal to zero. If it is, it applies a light green color (or any other color you prefer for positive values). If the value is negative, it applies a light red color (or any other color you prefer for negative values).

  8. Click "OK" to close the expression editor and then click "OK" again to close the Properties window  Ionic foot bath made in Canada  .

Your positive values should now be displayed in one color (e.g., light green) and negative values in another color (e.g., light red) within your QlikView chart. Adjust the colors and conditions as needed to suit your visualization preferences.

khadraouihiba02
Contributor III
Contributor III
Author

@muhammadrauf Thanks a lot