Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Ranking position on text box filtering

Hi everyone,

I posted a similar question some time ago. The issue is similar but with a variation.

I need to display in a text box the ranking of the value in a dimension against the others also when the value in that dimension is filtered.

suposing the following table:

LOAD * INLINE [

    Dim1, Value

    a, 120

    b, 30

    c, 45

    d, 15

];

I get the right ranking positions with the expression


=Aggr(Rank(Sum(Value)/Sum(Total Value)), [Dim1]):

rank1.png

the problem appears when I filter the value on Dim1 (which is mandatory):

rank2.png

"B" should be the third as seen before, but as I filter over it, it's the only value and the rankig says it's the first.

Does any one know how to solve this?

Thanks in advanced.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Aggr(Rank(Sum({<Dim1>}Value)/Sum(TOTAL {<Dim1>} Value)), [Dim1])


Capture.PNG

View solution in original post

1 Reply
sunny_talwar

Try this:

=Aggr(Rank(Sum({<Dim1>}Value)/Sum(TOTAL {<Dim1>} Value)), [Dim1])


Capture.PNG