Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
javier_florian
Contributor III

Set Analysis with Rank

Hello Pals,

I have a complex set analysis to show dynamic top ten according a dimension, when I tried to show the first one I set the follow expression and works fine:

Sum({<[Partner]={"$(=Aggr(If(Rank(Total Aggr((Sum({<Flag-={'BUDGET'}>}SumaDeValor)),

[Partner]))=1,[Partner]),[Partner]))"}>}SumaDeValor)

However, if I tried to show "Others" with the condition different to top 10, that didn't work:

Sum({<[Partner]={"$(=Aggr(If(Rank(Total Aggr((Sum({<Flag-={'BUDGET'}>}SumaDeValor)),

[Partner]))>10,[Partner]),[Partner]))"}>}SumaDeValor)

Any explication? How can I fix the set expression to work correctly?

Regards,

Tags (1)
1 Solution

Accepted Solutions

Re: Set Analysis with Rank

May be this? and you can use Others option enabled

Sum({<[Partner]={"=Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor))>10"}>}SumaDeValor)

Or

Sum({<Flag-={'BUDGET'}, [Partner]={"=Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor))>10"}>}SumaDeValor)


Or else


=IF(Aggr(Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor)),Partner)>10,Partner)

And expression


Sum(SumaDeValor)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
4 Replies
vishsaggi
Esteemed Contributor III

Re: Set Analysis with Rank

Can you share your sample file with an expected output?

Re: Set Analysis with Rank

May be this? and you can use Others option enabled

Sum({<[Partner]={"=Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor))>10"}>}SumaDeValor)

Or

Sum({<Flag-={'BUDGET'}, [Partner]={"=Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor))>10"}>}SumaDeValor)


Or else


=IF(Aggr(Rank(SUM({<Flag-={'BUDGET'}>} SumaDeValor)),Partner)>10,Partner)

And expression


Sum(SumaDeValor)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: Set Analysis with Rank

Where exactly are you trying to show this? What is your dimension for the chart?

javier_florian
Contributor III

Re: Set Analysis with Rank

Was I in a loop mental analysis? hahaha