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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
retko1985
Creator II
Creator II

Rank on Field having empty values.

Hello,

I am using ONLY aggregation function to display the values (cant use SUM  etc.), now I have a problem, where I need to rank the values, and values having empty string are ranked above the others. But I need them to be below.

Here is an example:

I am also attaching this example file.

Thank you very much.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be use this if you want the rank to be null for when the sales is null?

Rank(Only({<Sales = {"=Len(Trim(Sales)) > 0"}>}Sales),0,1) -> For Blank Sales (not null)

Rank(Only({<Sales = {"*"}>}Sales),0,1) -> For when Sales is truly null

View solution in original post

3 Replies
olivierrobin
Specialist III
Specialist III

hello

it's strange

in doc, we see :

Ranking functions in charts

These functions can only be used in chart expressions.

Suppression of zero values is automatically disabled when these functions are used. NULL

values are disregarded.

sunny_talwar
MVP
MVP

May be use this if you want the rank to be null for when the sales is null?

Rank(Only({<Sales = {"=Len(Trim(Sales)) > 0"}>}Sales),0,1) -> For Blank Sales (not null)

Rank(Only({<Sales = {"*"}>}Sales),0,1) -> For when Sales is truly null

retko1985
Creator II
Creator II
Author

Great, Thank you