Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

color in line chart

Hi All,

I am using one line chart in my dashboard. In this chart Emp is a dimension and Sum(Sal) is expression.

Now my requirement is, if my line is increasing then it will show as green line and if it will decreasing then Red color.

please help.

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use the background color option of your expression (click on the plus sign in front of the expression) and use something like this

if(MyExp<Below(MyExp),lightgreen(),lightred())

Where MyExp is the label of your Sum(Sal) expression, if there are spaces in them put it between [] brackets.

LineGreenRed.png

View solution in original post

5 Replies
MayilVahanan

Hi

Try like this

Background Color:

= if(PreviousSales - CurrentSales > 0, Green(), Red())

Thanks & Regards,
Mayil Vahanan R
soha1902
Creator
Creator
Author

Hi I tried to write

below expression under Background color

=if(Above(Sum(Sal) - Sum(Sal) > 0 , Red(),Green())

but its not working.

col.png

stigchel
Partner - Master
Partner - Master

You can use the background color option of your expression (click on the plus sign in front of the expression) and use something like this

if(MyExp<Below(MyExp),lightgreen(),lightred())

Where MyExp is the label of your Sum(Sal) expression, if there are spaces in them put it between [] brackets.

LineGreenRed.png

jsingh71
Partner - Specialist
Partner - Specialist

use this expression:

if(Sal > Below(Sal) , Red(), Green()))

niharika
Creator II
Creator II

Hi,

  Use

(Sales-Below(Sales)<=0,green(),red()) 

in background exp, where  Sales is the name of the expression.