# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

## How to Change Bubble Chart Color?

Hi, I have a bubble chart, and am trying to change color of the bubble by a formula. I opened the Background Color of the Expression, entered the definition of : =if(Savings>2000, Green(), Red()) . If this was working, I would see a lot of green, the rest blue. Instead the bubbles stay red.. What am I missing? Thank you in advance.

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: How to Change Bubble Chart Color?

try the background color on the first one

12 Replies
MVP

## Re: How to Change Bubble Chart Color?

maybe you need a

sum(Savings)? or some other aggregation function

Not applicable

## Re: How to Change Bubble Chart Color?

I tried that, didn't work. I even used a static color expression of Green(), still stays red. I'm guessing there is a

checkbox somewhere that needs to be unchecked? I looked and didn't see anything. Thank you.

MVP

## Re: How to Change Bubble Chart Color?

is it the first expression?

value of saving?

Employee

## Re: How to Change Bubble Chart Color?

Recently I wanted to have the bubble color change with the bubble size.  Here's what I did...

Given:

Scatter plot Dimension: [Employee Name].

Scatter plot Measures: [Sales], [Years Employed], and [Quota] (all of these are being Summed).

In the color by expression field, my formula is:

Colormix1((Sum([Quota])-\$(=min(aggr(Sum([Quota]),[Employee Name]))))/\$(=(max(aggr(Sum([Quota]),[Employee Name]))-min(aggr(Sum([Quota]),[Employee Name]))))

,rgb(254,227,145)

,rgb(102,37,6))

The gist of the Colormix1() function is that you need to give it a value, then a start color, and an end color.  Note: there is also a Colormix2() function which gives you the ability to set a midpoint color.

Hope this helps.  See the first sheet of the attached qvf file.

Not applicable

## Re: How to Change Bubble Chart Color?

Thanks Ian. I'll have to look into the Colormix function, seems very advanced I'm not sure how to open your file?

Not applicable

## Re: How to Change Bubble Chart Color?

No, it's the 3rd. See screen:

MVP

## Re: How to Change Bubble Chart Color?

try the background color on the first one

Esteemed Contributor III

## Re: How to Change Bubble Chart Color?

You posted the question under Qlik Sense, but apparently you use QlikView, hence the confusion.

Can you try color on the dimension side rather than expression?

Esteemed Contributor III

## Re: How to Change Bubble Chart Color?

No, not the dimension.  It is first expression, background color, as massimo.grassi‌ said.