# Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today. Not applicable

## conditional colors in a bar chart

I would like to create a bar chart that shows the total revenues per city and the colour of every column depends on a division.

The formula is more or less the following:

IF(Sum(cost)/Sum(ricavo) >= 0.75, Red()),

IF(Sum(cost)/Sum(ricavo) < 0.75 and Sum(costo)/Sum(ricavo) >= 0.70, Yellow()),

IF(Sum(cost)/Sum(ri) < 0,70, Green())

As you can see there are three colors but obviously the expression doesn't work.

Can you help me?

Tags (1)
2 Replies MVP

## Re: conditional colors in a bar chart

Try this:

If(Sum(cost)/Sum(ricavo) < 0.70, Green(), If(Sum(cost)/Sum(ricavo) < 0.75, Yellow(), Red()))

Contributor II

## Re: conditional colors in a bar chart

if(Sum(cost)/Sum(ricavo) >=0.75, Red(),

if(Sum(cost)/Sum(ricavo) <0.75 and Sum(cost)/Sum(100) >=0.70, Yellow(),

if(Sum(cost)/Sum(ri) <0.70, Green())))

Community Browser