Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rank an aggregated count

Hi

I'm sure this is pretty simple but I cannot seem to get my head around it

I have a variable vCount:  aggr (count ({1}race_time),race_distance, temp, altitude)

What I want to achieve is to take the race_time values that make up the aggregate and then rank them from lowest to highest. E.g:

race_timerank
9.854 / 4
9.581 / 4
9.753 / 4
9.652 / 4

Any help greatly appreciated.

Thanks

Matt

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Use the Rank($(vCount))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Kushal_Chawda

Hi,

see the attached application. Hope it will help you

Not applicable
Author

try this

Rank(-1 * aggr (count ({1}race_time),race_distance, temp, altitude))

or in variable try this

Rank(-1 *$(vCount))

Anonymous
Not applicable
Author

Thanks for the reply but I only have QV Personal so cannot view this

Apologies for not specifying this in my original post.

Anonymous
Not applicable
Author

Thanks for the response.  Rank($(vCount)) returns:

1

1

1

1

in the rank field. 

If I just specify the variable it displays the correct count so I'm not sure why I'm seeing these results.

Anonymous
Not applicable
Author

Thanks for the response.  As with the previous poster these both return:

1

1

1

1

in the rank field. 

If I just specify the variable it displays the correct count so I'm not sure why I'm seeing these results.

Anonymous
Not applicable
Author

Simply give a '-' in front of the variable, vCount:  -aggr (count ({1}race_time),race_distance, temp, altitude)

Then use Rank($(vCount))

SunilChauhan
Champion
Champion

rank(aggr (count ({1}race_time),race_distance, temp, altitude))



hope this helps




Sunil Chauhan