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

Rank in Text Object

Hi all,

I have a text object where I want to display the top subcategory based on a count of respondents (for a survey).

I try the following function:

=IF(

                    RANK( TOTAL

                    aggr( count( distinct ResponseID), subcategory)

 

                    , 4)

 

                              = 1

 

                                        , subcategory)

This gives me no (null) result.  Does anyone know how to use the rank function in a text object in this way?

Thanks!

GPC

1 Solution

Accepted Solutions
Not applicable
Author

Hi ,

Try this expression in a Text object..

only({<subcategory= {"=rank(Count(distinct ResponseID),subcategory) =1"}>} subcategory )

Hope it helps you..

Thanks,

Bhaskar..

View solution in original post

5 Replies
Not applicable
Author

=IF(RANK(sum( TOTAL aggr( count( distinct ResponseID), subcategory)), 4) = 1 , subcategory)

Not applicable
Author

Thanks for your response.  Unfortunately I get the same result. 

I can do a straight table with subcategory in the dimensions and use my original formula to get the subcategory that has the most respondents displayed.

However, when I remove the dimension of subcategory (as in a text object) then this no longer displays, I get null value.

Thanks

GPC

Not applicable
Author

Hi ,

Try this expression in a Text object..

only({<subcategory= {"=rank(Count(distinct ResponseID),subcategory) =1"}>} subcategory )

Hope it helps you..

Thanks,

Bhaskar..

Not applicable
Author

Brilliant, thanks so much!

Anonymous
Not applicable
Author

Hi All,

I have defect table and displaying top3 defect owners name list in single text object.

Now I want to display top3 owners defect counts also in the same text object.


below one currently using for displaying owners name list,

Concat(IF(aggr(Rank(Sum(passed)),executedby)<=4,executedby & chr(10)))

IF ANYONE HAVE IDEA TO MODIFY THE ABOVE EXPRESSION,PLS SHARE

THANKS,

Prakash