# Qlik Sense App Development

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

Partner

## Color of BOXPLOT by Expression

Hey Guys,

I just saw it's possible to change the color of Boxplots in QlikSense! I think it's new, cause I swear I searched it once and couldn't find it.

Anyway.
Now I want  my Boxplot to have a nice color by expression.

I already tried it, but i can't manage to do it somehow...

So I have minutes as x and depth as y axis.

And as you can see, I want the color between 5 and 6 to be green, everything else red.

My expression: If(depth.avg > 5 AND depth.avg < 6, Green(), RGB(255,0,0)).

But as you can see, it's not working.

I would really appreciate some help! 🙂

Labels (4)

• ### qliksense

1 Solution

Accepted Solutions
Highlighted
Employee

## Re: Color of BOXPLOT by Expression

Hi Joshua,

Sure, just replace the max/min aggregation with the aggregation for the quartiles. To see how we calculate the quartiles you can go into "box plot elements" in the property panel and turn off presets and then expand the "box start" and "box end".

Here is a new version of the app with a new color expression based on using Tukey for quartile calculations.

Patrik.

4 Replies
Employee

## Re: Color of BOXPLOT by Expression

Hi Joshua,

The color expression in box plot was added in November 2017 release.

What it does is to color the entire box with a color based on your expression. So if I understand your case it won't color the area between 5 and 6 of the box. If that is what you want?

On the other hand if you want to color the box based on the entire box being inside the area from 5 to 6 then you would have to modify your expression to see if max(depth.avg) is less than 6 and min(depth) more than 5 then it should work.

Patrik.

Partner

## Re: Color of BOXPLOT by Expression

Hi Plu,

thank you.

Is it somehow possible, to get the Quartile-Values instead of min max?

Highlighted
Employee

## Re: Color of BOXPLOT by Expression

Hi Joshua,

Sure, just replace the max/min aggregation with the aggregation for the quartiles. To see how we calculate the quartiles you can go into "box plot elements" in the property panel and turn off presets and then expand the "box start" and "box end".

Here is a new version of the app with a new color expression based on using Tukey for quartile calculations.

Patrik.

Partner

## Re: Color of BOXPLOT by Expression

Awesome! Thank you so much.