Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using QlikSense web edition. I am trying to achieve Ranks based on two-dimensional values. Please find the sample data below.
Year | Fund | Price | Rank |
---|---|---|---|
2018 | A | 400 | 1 |
2018 | B | 300 | 2 |
2018 | C | 200 | 3 |
2018 | D | 100 | 4 |
2017 | A | 100 | 4 |
2017 | B | 200 | 3 |
2017 | C | 300 | 2 |
2017 | D | 400 | 1 |
The expression I tried is not working as expected:
=AGGR(Rank(sum([Price])),Fund,[Year])
Help would be appreciated.
Thanks,
-Vidya
if(rank(sum(Price))<=3,
sum(Price)
)
I believe concatenate might work. I have not tried yet. I will try and update the same
what is the result if you just use:
Rank(sum([Price]))
May be this.
Aggr(SUM( PRICE) ,YEAR, FUND))
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.
if(rank(sum(Price))<=3,
sum(Price)
)
I tried this. But I am not able to eliminate the empty values.
Remove Price column and Rank column.
Only leave the new "Top 3 Price" columns.
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