Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Top 3 Chart - Aggr + Rank + Set Analysis

Gents,

I'm struggling in create a new line chart with my "top 3" ranking data.

My goal is figure out the top "3" customers for each period and plot in a chart, as the picture below.

I think I'm closer to the solution using Aggr+Rank, but my results does not match yet. Any clue in the final expression?

Thanks in advance.

linechart.jpg

1 Solution

Accepted Solutions
MVP
MVP

Re: Top 3 Chart - Aggr + Rank + Set Analysis

Try an expression in your line chart like

=Sum( Aggr( If(Rank(Sum( Value)) <=3, Sum(Value)),  Month, Customer))

edit: changed Aggr() dimension order.

3 Replies
miguelbraga
Valued Contributor III

Re: Top 3 Chart - Aggr + Rank + Set Analysis

Hi Fabio,

Can you please attach your qvw file?

Thanks,

MB

MVP
MVP

Re: Top 3 Chart - Aggr + Rank + Set Analysis

Try an expression in your line chart like

=Sum( Aggr( If(Rank(Sum( Value)) <=3, Sum(Value)),  Month, Customer))

edit: changed Aggr() dimension order.

Re: Top 3 Chart - Aggr + Rank + Set Analysis

May be this:

Expression: =Sum(Aggr(If(Rank(Value, 0, 1) <= 3, Value), Month, Customer))

Capture.PNG

Community Browser