Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vidyasagar159
Creator II
Creator II

Ranking on Multiple Dimensions

Hi,

I am using QlikSense web edition. I am trying to achieve Ranks based on two-dimensional values. Please find the sample data below.

   

YearFundPriceRank
2018A4001
2018B3002
2018C2003
2018D1004
2017A1004
2017B2003
2017C3002
2017D4001

The expression I tried is not working as expected:

=AGGR(Rank(sum([Price])),Fund,[Year])

Help would be appreciated.

Thanks,

-Vidya

1 Solution

Accepted Solutions
NZFei
Partner - Specialist
Partner - Specialist

if(rank(sum(Price))<=3,
sum(Price)
)

View solution in original post

8 Replies
vidyasagar159
Creator II
Creator II
Author

I believe concatenate might work. I have not tried yet. I will try and update the same

NZFei
Partner - Specialist
Partner - Specialist

what is the result if you just use:

Rank(sum([Price]))

MarioCenteno
Creator III
Creator III

May be this.

Aggr(SUM( PRICE) ,YEAR, FUND))

vidyasagar159
Creator II
Creator II
Author

Awww. With yours and my expression (AGGR(Rank(sum([Price])), Fund,[Year])), I am getting the right results with the sample data. Now the issue is I want to show only the top 3.  Apologize for not mentioned this earlier. 

NZFei
Partner - Specialist
Partner - Specialist

if(rank(sum(Price))<=3,
sum(Price)
)

vidyasagar159
Creator II
Creator II
Author

I tried this. But I am not able to eliminate the empty values.

NZFei
Partner - Specialist
Partner - Specialist

Remove Price column and Rank column.

Only leave the new "Top 3 Price" columns.

vidyasagar159
Creator II
Creator II
Author

Unfortunately, I cannot do that. The user needs that Rank column to see which fund is on which Rank. Oh, wait I think I got it. I used the same logic for rank. Now I am seeing what I wanted. Thanks for your Help.

if(rank(sum(Price))<=3,
rank(sum(Price)),0
)


and from Data Handling tab I unchecked include 0 values.


Thanks,

-Vidya