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

9 Replies
MK9885
Master II
Master II

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

rittermd
Master
Master

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
Author

I am using KPI .

Not applicable
Author

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

MK9885
Master II
Master II

What is the expression you're using?

Not applicable
Author

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

rittermd
Master
Master

What does that mean?

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

MK9885
Master II
Master II

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

Michael_Tarallo
Employee
Employee

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