Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sjmghames
Partner - Contributor II
Partner - Contributor II

Conditional Formatting - Rows comparison

Hi,

Can someone help me do the following conditional formatting:

conditional formatting in pivot table by comparing each row to the previous one and color the cells accordingly. (multiple rows exist)

If cell (I,j) > cell(I-1,j) --> red

If cell (I,j) < cell(I-1,j) --> green

else no format

8 Replies
sjmghames
Partner - Contributor II
Partner - Contributor II
Author

Hi all,

Any hint for the above question?

OmarBenSalem

if(yourExpression> Above(yourExpression), green(),Red())

Example:

if(sum([Car sales])> Above(sum([Car sales])), green(),Red())

Capture.PNG

sonu8072
Contributor III
Contributor III

Thanks! Works like a charm.......

Also, is there a way to do this from the 'left cell' (not above)?

sonu8072
Contributor III
Contributor III

Got it, just use before() instead of above().

brunobertels
Master
Master

Hi

yes there is ...

use before() instead above() :

if(sum([Car sales])> before(sum([Car sales])), green(),Red())


Hope it helps

sjmghames
Partner - Contributor II
Partner - Contributor II
Author

Thank you, it was really helpful.

sjmghames
Partner - Contributor II
Partner - Contributor II
Author

Thank you very much. It worked fine

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!