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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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
Champion III
Champion III

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))