Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

mattbowers
New Contributor

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

Re: Rank an aggregated count

Hi,

     Use the Rank($(vCount))

Regards,

Kaushik Solanki

Re: Rank an aggregated count

Hi,

see the attached application. Hope it will help you

Not applicable

Re: Rank an aggregated count

try this

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

or in variable try this

Rank(-1 *$(vCount))

mattbowers
New Contributor

Re: Rank an aggregated count

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

Apologies for not specifying this in my original post.

mattbowers
New Contributor

Re: Rank an aggregated count

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.

mattbowers
New Contributor

Re: Rank an aggregated count

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.

vamshi_1957
Contributor II

Re: Rank an aggregated count

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

Then use Rank($(vCount))

chauhans85
Esteemed Contributor

Re: Rank an aggregated count

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



hope this helps




Community Browser