Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi fellow Qlik Sense Users,
I have a a calculated field based on a sum that returns a percentage as the result.
(Count({<CLASSIFICATION={'CASES RATED B-G'}>} CLASSIFICATION)/count(CASE_ID)
This works perfectly in giving the correct percentage as the answer. However, I am stuck in trying to work out how I can colour code the answer.
If the answer is:
>=25% RED
>=12.5%, <25% YELLOW
<12.5% GREEN.
I have tried using IF.... but the answer is complete gibberish.
Can any one please provide some input into how I can resolve this problem I am having.
Many thanks in advance,
David
Hello, this is the code:
IF(
Count({<CLASSIFICATION={'CASES RATED B-G'}>} CLASSIFICATION) / Count(CASE_ID) >= 0.25,
RGB(255, 0, 0), // Red
IF(
Count({<CLASSIFICATION={'CASES RATED B-G'}>} CLASSIFICATION) / Count(CASE_ID) >= 0.125,
RGB(255, 255, 0), // Yellow
RGB(0, 255, 0) // Green
)
)
Regarts.
Hi cristianj23a,
Thanks for your reply.
I have applied your recommendation, and unfortunately the answer provided is the same as I have before (4294967040)
The numbers I have are 20 (cases rated b-g) / 105 (count(case_ID)) = 0.1904 (19.04%)
This result would then be displayed YELLOW
do you have any further suggestions?
Many thanks in advance
Hello, this is the code:
IF(
Count({<CLASSIFICATION={'CASES RATED B-G'}>} CLASSIFICATION) / Count(CASE_ID) >= 0.25,
RGB(255, 0, 0), // Red
IF(
Count({<CLASSIFICATION={'CASES RATED B-G'}>} CLASSIFICATION) / Count(CASE_ID) >= 0.125,
RGB(255, 255, 0), // Yellow
RGB(0, 255, 0) // Green
)
)
Regarts.
Hi cristianj23a,
Thanks for your reply.
I have applied your recommendation, and unfortunately the answer provided is the same as I have before (4294967040)
The numbers I have are 20 (cases rated b-g) / 105 (count(case_ID)) = 0.1904 (19.04%)
This result would then be displayed YELLOW
do you have any further suggestions?
Many thanks in advance