Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare values in cells

Hai all

I am new to Qlikview. I am working on a table. I populated it with right data, calculated expressions etc.

Can someone suggest me how to do this?

I have a 3 sort fields - Region, country , year and year has 2009 and 2010. so there will be 2 records. I want to make value for 2010 Green if it is more than value for 2009 for that region and country else if it is less I need to make it Red. either change the font color or fill the cell with those colors. And later I need to count the number of greens and reds. How can this be done?

Please let me know of any questions.



Thanks a lot..

21 Replies
john_duffy
Partner - Creator III
Partner - Creator III

Hello.

You can expand the options on each dimension or expression and set the background or text colour. This can be done by simply assigning a colour (eg. red()) or by entering an expression (eg. if (amount > 10,red(),green()).

Let me know if this helps.

John.

Not applicable
Author

Thanks for your reply. Its not based on condition. Its based on value of prior record value

Not applicable
Author

I guess I need to use Last function but I am not sure how to use it on a field

john_duffy
Partner - Creator III
Partner - Creator III

How about using the above function? Something like if (above(sum(fieldA)) > sum(fieldA),green(),red()).

Not applicable
Author

Above may work but its giving error..syntax issue may be

hector
Specialist
Specialist

hi,

maybe with the first line, above() is null, you need to change this

rgds

Not applicable
Author

I am not sure what should I do?

Its like compare value with above and change background to green if more than above else red

hector
Specialist
Specialist

Hi,

something like this?

rgds

Not applicable
Author

wow hector..it looks like i need this..can you please send that expression,