Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshuahirsch
Partner - Contributor III
Partner - Contributor III

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.

bplot.PNGI 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 (3)
1 Solution

Accepted Solutions
Patrik_Lundblad
Employee
Employee

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".

quartiles.PNG

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

Patrik.

 

View solution in original post

4 Replies
Patrik_Lundblad
Employee
Employee

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. 

boxplot color.PNG

 

Patrik.

joshuahirsch
Partner - Contributor III
Partner - Contributor III
Author

Hi Plu,

 

thank you.

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

Patrik_Lundblad
Employee
Employee

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".

quartiles.PNG

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

Patrik.

 

joshuahirsch
Partner - Contributor III
Partner - Contributor III
Author

Awesome! Thank you so much.