Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
emteam162
Creator
Creator

TOP N

Hi All,

I want compare top N sales by year, in my dimension i put Month and in my expression i have this :

Sum({<Sales={"=

rank(

sum({<year={'$(vMaxYear)'} >}number)

)<N"},

year=,month=,

year={'$(vMaxYea)'},

>}  number)

but when i check (i created straight table with all sales store by expression desc and select year and month ) i don't have same result

Please, Any idea ???

Many thanks

Emteam

4 Replies
emteam162
Creator
Creator
Author

Hi,

Any IDEAS????

Regards,

Emteam

Not applicable

Hi Emteam,

I did not understand your expression,.but you can get the top n records by creating a variable and use that variable in slider object..The process is 1.create variable.2.create slider object 3. In the slider object propertes ,In the general tab in the data option in place of selecting field ,select the variables option, in that select the variable you have created and adjust the scale according to your requirement

hope it helps

you

regards ramesh    

emteam162
Creator
Creator
Author

Hi rameshmca,

thanks for your answer.

I explain what i want : i will create line chart to have only top 10 costumer

in my dimension i have Month and im my expression i have this

Sum({<CostumerID={"=

rank( sum({<year={'$(vMaxYear)'} >}amount),costumerID)<Top10"},

year={'$(vMaxYea)'},

>}  amount)

i have this

Month2012


2011

TOTAL4 4298 998
Janv6387430
Fev891994
Mars156166
Avril1 499167
May1 245241
Juin00

but when i make selection in month for exemple i select Jan i have this result

Month2012


2011

7388 430
Janv7388430

Is not same result i have in the first table

May be my expression is false i can't explain difference the result

if you have any idea ?

Many thanks

Emteam

emteam162
Creator
Creator
Author

Please, Any idea ???