Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help with Conditionally coloring percentages

Hi all, I was wondering if anyone could help me with this formula.

My first formula works...here it is.

Num(Count({<test_score = {">=4"}>} test_score) /Count(test_score),'0%')

This is giving me a KPI with a percentage of how many test scores are over 4.

I wanted to conditionally color it based on how high the percentage is. This is the part I am having a difficult time with.

=if(([test_score]) >= 60, rgb(132,186,8))

=if(([test_score]) >=31 and <-59 rgb(255,203,85))

=if(([test_score]) <= 30, rgb(247,77,49))

Can anyone help me to get this to work? I think the first and 3rd lines work but I am not sure how to get this range between 31 and 59 to work.

Thanks,

Jordan

1 Solution

Accepted Solutions
OmarBenSalem

It's way simpler than that

use a KPI object;

as an expression :

Count({<test_score = {">=4"}>} test_score) /Count(test_score)


don't use the num to format it; you can format it using qlik sense options:

Capture.PNG


NOW? YOUR MEASURE WOULD BE FROM 0 TO 1

to color it:

under color, activate conditionnal colors; add 2 new limiters 0.3 and 0.6; and then qlik on the bar to choose ur colors:

Capture.PNG

View solution in original post

2 Replies
OmarBenSalem

It's way simpler than that

use a KPI object;

as an expression :

Count({<test_score = {">=4"}>} test_score) /Count(test_score)


don't use the num to format it; you can format it using qlik sense options:

Capture.PNG


NOW? YOUR MEASURE WOULD BE FROM 0 TO 1

to color it:

under color, activate conditionnal colors; add 2 new limiters 0.3 and 0.6; and then qlik on the bar to choose ur colors:

Capture.PNG

Anonymous
Not applicable
Author

Thanks Omar. That appears to have worked.