Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kah
Contributor
Contributor

Rank function with multiple dimension

Hi, 

I would like to add the rank function to the stacked charts.

I have two dimensions in my chart:

1) id

2) defect type

In expression number of defects is calculated.

Unfortunatelly the aggr rank function which I used, give me the same results as the rank funtion.

Rank(defect): 

rank((count({<counter={'1'}>}
Total <id> distinct(level))), 0, 1)

The output is :

id    defect type    rank(defect)

1     A                         1

2    B                          1

1   B                           1

I found in the community that for ranking multiple dimensions aggr function is used.

So I tried:

aggr(rank(defect), id, [defect type])

But I get the same results 

id    defect type    raggr(ank(defect), id, [defect type])

1     A                         1

2    B                          1

1   B                           1

What I'm doing wrong?

Labels (1)
  • Rank

2 Replies
edwin
Master II
Master II

Is it possible that they all have the same Defect result?  QV will rank same results as the same rank number.

Brett_Bleess
Former Employee
Former Employee

Found the following Design Blog post that may help, geared to Sense, but should be applicable here too:

https://community.qlik.com/t5/Qlik-Design-Blog/Rank-Function/ba-p/1466430

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.