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

dimension ranked, same rank on each row

Hello community,

I have a straight table like the printscreen below. I want a ranking on amount per person and the rankingno repeated on each row that 'belongs' to the specific person.

Also, in the situation below: I want to see two times '1' , three times '2' and four times '3'.

see also attachment with this example

1 Solution

Accepted Solutions
Gysbert_Wassenaar

add the word nodistinct in the aggr function: aggr(nodistinct rank(.... etc.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

add the word nodistinct in the aggr function: aggr(nodistinct rank(.... etc.


talk is cheap, supply exceeds demand
sunny_talwar

Try this:

=Aggr(NODISTINCT Rank(Sum(amount)),Person)


Capture.PNG

jharke
Creator
Creator
Author

Hello Sunny

You and Gysbert were amazingly fast in responding with the correct answer. Gysbert was a bit faster (talking about seconds), at first I would like to give you the points to reach 100.000, but I see that you have already reached it recently. Congratulations!

sunny_talwar

Hahahaha Thank you

jharke
Creator
Creator
Author

I did not find this NODISTINCT in combination with Ranking in any document. And could not find it in discussions, as I did not know how to search for. Now I have some threads for people who want more info:

Re: Ranking

sunny_talwar

NoDistinct is not related to Rank, but it is more related to Aggr(). Since there is a dimension mismatch between your Aggr() function and your actual chart dimension, chart was only showing values for distinctly. Adding NoDistinct solves the issue here.

Read about grain mismatch here (point no.4)

Pitfalls of the Aggr function