Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
| mobile | amount |
| 93 | 500 |
| 94 | 400 |
| 85 | 500 |
| 84 | 400 |
| 73 | 500 |
| 72 | 400 |
Source Table:
| mobile | component | amount |
| 91 | roaming | 100 |
| 92 | roaming | 300 |
| 93 | roaming | 500 |
| 94 | roaming | 200 |
| 95 | roaming | 400 |
| 81 | gprs | 100 |
| 82 | gprs | 200 |
| 83 | gprs | 300 |
| 84 | gprs | 400 |
| 85 | gprs | 500 |
| 71 | sms | 300 |
| 72 | sms | 400 |
| 73 | sms | 500 |
| 74 | sms | 200 |
| 75 | sms | 100 |
Try this:
=Sum(Aggr(If(Rank(Sum(amount)) < 3, amount), component, mobile))
Try this:
=Sum(Aggr(If(Rank(Sum(amount)) < 3, amount), component, mobile))