Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

comparing values

Hi

I have 2 values 99.900% and the other is 99.7 in the database , I need to compare these two value to color a cell , if first one is greater than 2nd green else red, so when I convert the following number using num as 99.700%  or vice versa the color does not change , how do I make both in same format and make sure the color coding works ?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

You should first convert the text value(99.900%) to a number so that it can be compared to the numeric value (99.7) using the following: num(PurgeChar('96.900%','%'),'#.0');

Do this in the LOAD operation. For example, if the column name is Score:

Load

num(PurgeChar(Score,'%'),'#.0') as Score

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try multiplying the 99.000% with 100 or divide 99.7 by hundred so they are of the same order.


talk is cheap, supply exceeds demand
Not applicable
Author

You should first convert the text value(99.900%) to a number so that it can be compared to the numeric value (99.7) using the following: num(PurgeChar('96.900%','%'),'#.0');

Do this in the LOAD operation. For example, if the column name is Score:

Load

num(PurgeChar(Score,'%'),'#.0') as Score

MarcoWedel

Hi,

this seems to be possible as well:

QlikCommunity_Thread_199135_Pic1.JPG

hope this helps

regards

Marco