Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Color background based on top 3 sales

Hi All,

I want a code which will highlight my top 3 sales in a pivot table with red color. ?

Regards

Renjith

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ok, you probably use more than 1 dimension and want the top 3 sales across all values? Try adding a TOTAL qualifier:

=if(rank(TOTAL sum(Sales))<=3,lightred())

View solution in original post

4 Replies
swuehl
MVP
MVP

Use a background color attribute expression (open attributes by clicking the + next to the expression name in expression tab):

=if(rank(sum(Sales))<=3,lightred())

renjithpl
Specialist
Specialist
Author

its showing red for all the entries...

swuehl
MVP
MVP

Ok, you probably use more than 1 dimension and want the top 3 sales across all values? Try adding a TOTAL qualifier:

=if(rank(TOTAL sum(Sales))<=3,lightred())

Not applicable

For background color in expression, use the following expression

If(Rank(Sum(Sales])<= 3),RGB (255,0,0))