# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Contributor III

## Rank function help

Currently my dimension is Debiteur and my expression is   =if(rank(Sum([VERKOPE BTW UITG]))<10,sum({<[FIN JAAR]={2018} ,DEBITEURNO-={777777}>} [VERKOPE BTW UITG]))

The above expression works fine .

Know i want to remove the dimension  DEBITEUR (this leaves no dimensions) and my expected output should be the sum of the top 10 values shown below

1 Solution

Accepted Solutions
MVP

## Re: Rank function help

Should be just this

Sum(Aggr(

If(Rank(Sum([VERKOPE BTW UITG]))<10,sum({<[FIN JAAR]={2018} ,DEBITEURNO-={777777}>} [VERKOPE BTW UITG])), DEBITEUR))

2 Replies
MVP

## Re: Rank function help

Should be just this

Sum(Aggr(

If(Rank(Sum([VERKOPE BTW UITG]))<10,sum({<[FIN JAAR]={2018} ,DEBITEURNO-={777777}>} [VERKOPE BTW UITG])), DEBITEUR))

Contributor

## Re: Rank function help

Alternatively we can put the condition in the set expression .

sum({<DEBITEUR = {"=rank(Sum([VERKOPE BTW UITG]), 4)<10"},[FIN JAAR]={2018} ,DEBITEURNO-={777777}>} [VERKOPE BTW UITG])

Best Regards,

Vikraant