Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Creating dynamic color selection for Measures

hi,

I am using the 'Option button' to enable dynamic measure selection. I further want to make the color in my chart also dynamic, pertaining to which measure gets selected. However, it's not working.

if( $(Metric) = 'NM', rgb(0,139,0))

/ / where :Metric is the variable I have created using 'Option button'

               NM is one of the values the Metric variable takes

Appreciate the help !

Malvika

7 Replies
balrajahlawat
Esteemed Contributor

Re: Creating dynamic color selection for Measures

Did you check this??

color by expression - QlikSense

Not applicable

Re: Creating dynamic color selection for Measures

Hi Balraj,

Thank you for sharing this. However, this only talks about color by expression for different dimensions, whereas, i am looking for dynamism for measures.

isaaclin
New Contributor III

Re: Creating dynamic color selection for Measures

will you try background expression under Measures?

Capture.JPG

satishkurra
Valued Contributor II

Re: Creating dynamic color selection for Measures

Quickly, Is it something you are achieving in QV or QS?

Not applicable

Re: Creating dynamic color selection for Measures

In Qlik Sense, under data and the measure in question, you have the option to setup a background colour expression.

You could have, for example:

If([Column Name / Metric] = 'NM' LightRed(), If([Column Name / Metric] = 'XX', Yellow()))

You could then apply alternative expressions to each measure.

Not applicable

Re: Creating dynamic color selection for Measures

I am doing this in QS

Not applicable

Re: Creating dynamic color selection for Measures

Hi Michael,

I am afraid I did not quite fully understand what you meant. I had an understanding that Colors for measures can be changed using the Color by expression option. Since I am using dynamic measures based on selection using the 'Option button' extension, I have created a new variable. I want the color to change based on the value I select from the button. Your expression and the one that I am trying to use do not give me desired results.

Appreciate your assistance !

Community Browser