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: 
omid5ive
Creator II
Creator II

rank

i want something like this:

rank(sum({<Branch_Code={1}>}sales))



what should i do?

1 Solution

Accepted Solutions
sunny_talwar

My bad, try this:

Only({<Branch_Code = {1}>} Aggr(Rank(Sum(Sales)), Branch_Code))

Only({<Branch_Code = {2}>} Aggr(Rank(Sum(Sales)), Branch_Code))

Only({<Branch_Code = {3}>} Aggr(Rank(Sum(Sales)), Branch_Code))

View solution in original post

14 Replies
MK_QSL
MVP
MVP

Your requirement is not clear... please provide some more information.

sunny_talwar

I don't see any issue with the expression you have above. Is it not working?

omid5ive
Creator II
Creator II
Author

i need to set some condition on my ranking but i think in rank function i cant use set analysis

omid5ive
Creator II
Creator II
Author

i want to see the rank of sale for each branch in some text box

sujeetsingh
Master III
Master III

You already have it . Just you need to load some data in your file and plot the chart with this expression.

sunny_talwar

Condition as in Set Analysis? Use that in the Sum function rather than Rank.

omid5ive
Creator II
Creator II
Author

are you sure in rank function i can use set analysis?

because in my dashboard i cant use it
it will show nothing

sunny_talwar

For text box, you might need to do like this:

Only({<Branch_Code = {1}>} Aggr(Rank(Sum(Sales), Branch_Code))

Only({<Branch_Code = {2}>} Aggr(Rank(Sum(Sales), Branch_Code))

Only({<Branch_Code = {3}>} Aggr(Rank(Sum(Sales), Branch_Code))

....

and so on for each of your Branch Code

omid5ive
Creator II
Creator II
Author

in my case it will show 1 every time