5 Replies Latest reply: Nov 8, 2013 8:16 AM by Fabrice Aunez

# Rank for the latest month

Hi There

I’d like to know if it’s possible to get this result in a graph. This table is sorted by the latest month for the top 5 Empl

 EMPL Sep2012 Oct2012 Nov2012 Dec2012 Jan2013 Feb2013 Mar2013 Apr2013 May2013 Jun2013 Jul2013 Aug2013 Sep2013 Oct2013 AA 510 522 490 414 384 308 338 391 467 384 309 299 276 283 BB 305 359 314 274 220 212 215 216 248 234 180 171 191 173 CC 198 213 232 182 172 140 147 151 182 144 135 131 131 146 DD 176 188 158 157 153 107 124 135 153 117 119 108 112 112 EE 240 270 224 187 172 143 139 150 192 162 123 113 116 108
• ###### Re: Rank for the latest month

Hi

Try sth like that as your Expression:

=Aggr(If(Rank(Sum({Your last Month set Analysys there} Sales)) <6, Empl),  Empl)

Fabrice

• ###### Re: Rank for the latest month

I need help with the set analysis cause I have an if inside the sum:

=

aggr(if(rank(sum(if

• ###### Re: Rank for the latest month

Hi,

A document on set analyses that could be helpfull:

http://community.qlik.com/docs/DOC-4951

Your set should be sth like:

{    <Month = {"\$(=max({\$} Month))"}> }

The second \$ should be replaced with 1 if you want always the latest month in your database, whatever the choice made by the user.

The set may often replace the if, or can be placed before it (never tested it however)

Fabrice

• ###### Re: Rank for the latest month

I get an error at the 1st curly brackets:

=aggr(if(rank(sum(if(Ind = 'NG' and DLB = 'N', { }Count))),Empl),Empl)

• ###### Re: Rank for the latest month

Hi,

1) Your set analysis should be placed before the if statement. : sum(set analysis Expression)

2) According to me, the if statlement could be removed and the content be inserted into the set analysys:

{    <Month = {"\$(=max({\$} Month))"}, ind ={"NG", "N"} >}

Fabrice