Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
reivax31
Partner
Partner

ColorMix Min and Max value

Hi Qlikers,

I'm using ColorMix1 in a table to change the background color. So it works fine when I have values from '0' to '1'. But in my table the min value and max value are very close (like 0.65 and 0.60). So the background color are nearly the same for 0.60 and 0.65. Is it possible to set le 0.60=0 and the 0.65=1? It needs to work if the value changes to 0.40 and 0.45 also.

Thanks for your help

1 Solution

Accepted Solutions
brunobertels
Specialist II
Specialist II

Hi XAvier

As Sangram said in fact no matter the scale or the difference between your max and min value as colormixx can take a mesure to calculate the 0 (min) and 1 ( Max value)

See exemple beloww and attached qvf file : (thanks to Mickael Torrelo who provided this exemple )

it's showing how to use variable to put color and colormix as variable to reuse them after in your app.

Here this exemple put 2 colors as variable blue and salmon :

vblue  : RGB(68,119,170)

vsalmon : rgb(250,128,114)

then this 2 colors are used in a colormix mesure :

Colormix1((sum([Sales])-$(=min(aggr( sum([Sales]), CategoryName))))/$(=(max(aggr( sum([Sales]),CategoryName))

-min(aggr( sum([Sales]), CategoryName)))),white(),$(vSalmon))

this is to adapt with you data with country for exemple :

Colormix1((sum([Sales])-$(=min(aggr( sum([Sales]), country))))/$(=(max(aggr( sum([Sales]),country))

-min(aggr( sum([Sales]), country)))),white(),$(vSalmon))

Regards

View solution in original post

5 Replies
reddy-s
Master II
Master II

Hi Xavier,

I can't see why its not possible. Is it possible to attach a sample QVF so that it would be easy to solve it?

Thank you,

Sangram

brunobertels
Specialist II
Specialist II

Hi XAvier

As Sangram said in fact no matter the scale or the difference between your max and min value as colormixx can take a mesure to calculate the 0 (min) and 1 ( Max value)

See exemple beloww and attached qvf file : (thanks to Mickael Torrelo who provided this exemple )

it's showing how to use variable to put color and colormix as variable to reuse them after in your app.

Here this exemple put 2 colors as variable blue and salmon :

vblue  : RGB(68,119,170)

vsalmon : rgb(250,128,114)

then this 2 colors are used in a colormix mesure :

Colormix1((sum([Sales])-$(=min(aggr( sum([Sales]), CategoryName))))/$(=(max(aggr( sum([Sales]),CategoryName))

-min(aggr( sum([Sales]), CategoryName)))),white(),$(vSalmon))

this is to adapt with you data with country for exemple :

Colormix1((sum([Sales])-$(=min(aggr( sum([Sales]), country))))/$(=(max(aggr( sum([Sales]),country))

-min(aggr( sum([Sales]), country)))),white(),$(vSalmon))

Regards

View solution in original post

reivax31
Partner
Partner

Hi Bruno and Sangram,

I have added the qvf file and I tried the expression. But it stays in blank in my table...

Tanks for your support

brunobertels
Specialist II
Specialist II

Hi

I have a glance to your posted file it seems thats Target M50 and Target A50 are not values that can be or need to be summurize but dimension ?

For MSN 0005 there is only possible value with target M50 0,6 and so on

You must have several value to summurize to use with colormixx function

Bruno

reivax31
Partner
Partner

Hi bruno,

I will have to find a way to go around or build my table differently.

Thanks for your support