Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Color coding issue Qliksense

I am using the object KPI in qliksense. I am trying to show two number one of them is a number which can be any integer and other one is percentage.

I want to control the color of the number (integer) based on the percentage value.

Lets say if the number (percentage )is between 90 to 100 % then the number (integer) must show in green and in rest of the condition(0 - 90 %) it must be red.

Tags (2)
9 Replies
Khan_Mohammed
Honored Contributor II

Re: Color coding issue Qliksense

What's the name of extension you using in your app?

rittermd
Honored Contributor

Re: Color coding issue Qliksense

If you go to the properties of your KPI and open the measure you will see a button that says conditional colors.  Turn that on and then make your selection for the range.

Not applicable

Re: Color coding issue Qliksense

I am using KPI .

Not applicable

Re: Color coding issue Qliksense

Yes , that is correct . we can use conditional colors. But I am not able to do that.

Khan_Mohammed
Honored Contributor II

Re: Color coding issue Qliksense

What is the expression you're using?

Not applicable

Re: Color coding issue Qliksense

I am still trying to figure out the expression itself. Still not confident with the logic.

rittermd
Honored Contributor

Re: Color coding issue Qliksense

What does that mean?

It is not working?  You can't turn on the conditional colors?  You can't get the expression to work?

Khan_Mohammed
Honored Contributor II

Re: Color coding issue Qliksense

if(YOUR_EXPRESSION<90,red(),if(YOUR_EXPRESSION>90,green()))

You can use above expression to change conditional color. But my question here is, where are you defining your conditional color?

Cus in Default KPI from Qlik Sense has no Conditional Color change option. You can change the limits to change color. You do not have to write an expression.

Can you share a screen shot of the KPI you using? Or it's properties?

Color.png

The above Image has a conditional color option and it is Default KPI from Sense.

You can give limits there...Use the scroll bar below the colors to change the value and click on the color bar to add a color

Ex: 0-90>+ Green and then 90-100 + red

Employee
Employee

Re: Color coding issue Qliksense

Hello Nitesh -

I believe that this cannot be done with the default KPI chart object. The conditional color range does not define a color code value that you can specify based off of a measure  - you can only add sections with ranges of values that are upper and lower limits and all in between, which I do not believe gives you what you are after.

You can download the Simple KPI extension from Qlik Branch that will give you what you are after:

http://branch.qlik.com/#!/project/5677d80b7f70718900987bff

if(SUM(Sales) < 19000000,'#000000','#CCCFFF')

To learn more about Extensions and Qlik Branch - watch this video:

Qlik Sense - Introduction to Extensions (video)

Hope this helps

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik