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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

Top 3 values from the table?

I have table like

E.id, Basesalary

1, 1000

1, 2000

1, 3000

1, 5000

2, 2000

2, 3000

2, 4000

3,3000

3, 4000

4, 5000

4, 6000

Create a base salary table chart and highlight the top three with different colours. Use autogenerate number as id colum

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Did you try the expr i sent in your Qliksense? You want to display only top 3 in your table?

If yes, try calculated dimension like:

For your E.id dimension write the below

= Aggr(IF(Rank(Max(Basesalary),4,1)<4, E.id), E.id)

View solution in original post

5 Replies
vishsaggi
Champion III
Champion III

Add Straight table and add

Dim: E.id

Expr: = Max(BaseSalary)

then in expr background add

= Pick(Rank(max(Basesalary),4,1), LightGreen(), LightGray(), LightRed())

alis2063
Creator III
Creator III

Expression:

IF(RANK(SUM(Amount))<4,SUM(Amount))

Background Expression:

IF(RANK(SUM(Amount))=1,rgb(255,0,0),

IF(RANK(SUM(Amount))=2,rgb(128,255,0),

IF(RANK(SUM(Amount))=3,rgb(0,255,255))))

Employee.jpg

Kohli
Creator II
Creator II
Author

Iam using QlikSense

vishsaggi
Champion III
Champion III

Did you try the expr i sent in your Qliksense? You want to display only top 3 in your table?

If yes, try calculated dimension like:

For your E.id dimension write the below

= Aggr(IF(Rank(Max(Basesalary),4,1)<4, E.id), E.id)

Kohli
Creator II
Creator II
Author

yes, iam getting. But i want different colours.