Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

suggest

Hi,


I need display top2 amounts by components

My script looks like as below

Rank(Aggr(Sum({<mobile={'=Rank(Sum(amount))<=3'}>}amount),component),component)

but not getting accurated output.

This is my Expected Output table

   

mobileamount
93500
94400
85500
84400
73500
72400

Source Table:

   

mobilecomponentamount
91roaming100
92roaming300
93roaming500
94roaming200
95roaming400
81gprs100
82gprs200
83gprs300
84gprs400
85gprs500
71sms300
72sms400
73sms500
74sms200
75sms100
Tags (1)
1 Solution

Accepted Solutions

Re: suggest

Try this:

=Sum(Aggr(If(Rank(Sum(amount)) < 3, amount), component, mobile))

1 Reply

Re: suggest

Try this:

=Sum(Aggr(If(Rank(Sum(amount)) < 3, amount), component, mobile))