Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Always display a value at the end of the ranking

Hi,

I have a field called 'Unknown' and I would like it to appear at the end when I am ranking the other fields in the table.

For example, there are 10 types of car manufacturers that I would like to ran as top 5 based on their sales and I have an unknown among them. I want the 'Unknown' to always appear at the 5th or the 6th position.

Thanks in advance for the help.

Aish

4 Replies
swuehl
MVP
MVP

Can you post a small sample app that demonstrates your setting, especially what you mean with this 'unknown' value?
'

Not applicable
Author

Say a data load like below:

Load *

INLINE [Manufacturer Sales

Honda 1000

BMW 2000

Nissan 3200

Toyota 2345

Infiniti 1244

Audi 4567

Ford 2466

Unknown    9845

];

I want to rank them. I don't want to include the unknown in the ranking because it is just a wildcard name for the manufacturers I don't know the name for. But, I want to display it as the last in my top_5 ranking. Is it clearer now?

swuehl
MVP
MVP

Maybe something like this as expression in a straight table with dimension Manufacturer:

Sum({<Manufacturer = {"=Rank(Sum({<Manufacturer -= {'Unknown'}>} Sales),4) <=5"} + {'Unknown'}>} Sales)

(Create a set of Manufacturers based on Top 5 sales, excluding Unknown in the ranking, but afterwards adding Unknown as constant value to the set)

reddy-s
Master II
Master II

Hi Aishwarya,

You will have to create ranking in the table and that rank can be made use of sort the info in the front end. This could be the best way of doing it.

Thanks,

Sangram Reddy.