Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nulls in rank

while Using the rank function in a straight table.   I had taken 3 fields productID, Product Name, and in expression  count(Product ID) as Total Products  and rank column also in expressions.  but i was reloaded successful, and the result is same excatly what i expected ,  so one more column i added Month  the result is showing that some fields are null. the data and the application is attached below

Capture.JPG

21 Replies
Not applicable
Author

sorry it is not working

vinieme12
Champion III
Champion III

there is plenty of content available for similar queries

https://community.qlik.com/search.jspa?q=top+10

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

okay i'll check the above link thanks for the information

vinieme12
Champion III
Champion III

=if( AGGR( rank(total count(ProductID)/Count(TOTAL ProductID),0,1), ProductID)<=10, sum(sales))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

it is showing somw values as zeros and remaining are nulls

vinieme12
Champion III
Champion III

don't know where you are trying this, can you post a screenshot?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Kushal_Chawda

% expression

if(rank(total count({<ProductID,month,ProductName>}ProductID)/Count(TOTAL {<ProductID,month,ProductName>}ProductID),0,1)<=10,

count({<ProductID,month,ProductName>}ProductID)/Count(TOTAL {<ProductID,month,ProductName>}ProductID))*avg(1)

Rank Expression

if(rank(total count({<ProductID,month,ProductName>}ProductID)/Count(TOTAL {<ProductID,month,ProductName>}ProductID),0,1)<=10,

rank(total count({<ProductID,month,ProductName>}ProductID)/Count(TOTAL {<ProductID,month,ProductName>}ProductID),0,1))*avg(1)

Not applicable
Author

Capture1.JPG

vinieme12
Champion III
Champion III

see attached

rank.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

check the app i attached!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.