Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
miranrai
Contributor III
Contributor III

Rank Function for serial no issue

Hi,

I have a chart which has 2 dimensions + 1 calculated dimension and 5 expressions with set analysis. I want to add serial number for top 20 sales segments. I have used rank function for serial number but somehow its showing null values for some of the records. I am not sure whats going wrong. Please help. I am attaching a sample qvw.

1 Reply
miranrai
Contributor III
Contributor III
Author

Hi,

null is appearing in expression because there are seg with same name and but different sub. Sometimes we just needed to add extra eye to what we are writing .. Here is the solution .. !

IF(aggr(rank(total aggr(sum({<mon={1}>}sales),seg,sub),0,1),seg,sub)<=20, 

aggr(rank(total aggr(sum({<mon={1}>}sales),seg,sub),0,1),seg,sub))