Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to rank results in the same way as a rank function does in sql server:
Platform | Site | Value | Rank |
Mobile | EN | 300 | 1 |
Mobile | IL | 150 | 2 |
Mobile | DE | 150 | 2 |
Mobile | PL | 100 | 4 |
PC | EN | 600 | 1 |
PC | IL | 600 | 1 |
PC | DE | 400 | 3 |
PC | PL | 200 | 4 |
Crypto | EN | 400 | 1 |
Crypto | IL | 300 | 2 |
Crypto | PL | 100 | 3 |
Crypto | DE | 100 | 3 |
I've already tried:
with order by Platform, Value
Is there a way to do this in QlikView?
I managed to do it:
LOAD *,
If(Platform= Previous(Platform) and Value= peek(Value), Peek(Rank), RowNoTMP) as Rank;
LOAD
*,
if(Platform= Previous(Platform), Peek(RowNoTMP) + 1, 1) as RowNoTMP
resident TBL
order by Platform , Value desc;
If You know any better solution, I'll be happy to know it 🙂