Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank problem

Hi all,

     I have a qvw app which contains only 1 table:

prdsalesarea
p127a
p217a
p315a
p415a
p529a
p629a
p721a
p128b
p227b
p329b
p426b
p520b
p617b
p720b

I want to create a straight table:

Dimension: area

Expression:

         1. mkt size=sum({<prd=>}sales)

         2. prd sales=sum(sales)

         3. rank = i do not know

when selecting 1 prd (say 'p1'), the 'rank ' expression will shoe the ranking of 'p1 'in each area.

if i select 'p2' , the right appearence of this straight should be:

areamkt sizeprd salesrank
a153174
b167273

how this 'rank' expression should be ? Thank you all in advance!

Attachment is my app.

1 Solution

Accepted Solutions
kristoferahlin
Partner - Contributor III
Partner - Contributor III

Hi,

Please see attached example.

Regards,

Kristofer

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi

Try this this is working

=Rank(sum(sales))

Regards

Harsha

Not applicable
Author

try this

aggr(rank(sum(sales),prd,area))

kristoferahlin
Partner - Contributor III
Partner - Contributor III

Hi,

Please see attached example.

Regards,

Kristofer

Not applicable
Author

Thank you. You got the right rankings. But i still don't know why the ' {<prd=>}' should be added in the expression.

Anyway i will use your expression.  Thanks again.