Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
merrillbrink
Contributor II
Contributor II

How to display expression values by rank for different date periods within same table

Hi all,

I have a problem trying to display the top 5 values per month in a chart. The challenge is due to the fact that the dimension names associated with the highest value can change every month.

I would like the chart to display similar to this, with the dimension Country showing only in top 5 order each month, based on the calculated expression Units.

JanFebMar
CountryUnitsCountryUnitsCountryUnits
Germany122France105Spain111
France97Italy102Germany107
Spain74US93Japan105
US72China88Sweden90
Japan65Sweden80Italy71

Currently my table is showing like this, and can only be sorted by month individually.

CountryJanFebMar
Germany12272107
France9710563
Spain7468111
US729351
Japan6577105

The basic expression I'm using for each month is as follows:

=sum({<[Month]={'Jan'}>} [Units])

Is there a way to rank countries for each month separately and have the fields display accordingly?

Thanks very much.

3 Replies
merrillbrink
Contributor II
Contributor II
Author

Hi,

I have been trying to find a solution to this, but with no success so far.

Does anyone have any suggestions?

Thanks again.

Not applicable

Hi,

try the below expression

=Aggr(Rank(Sum(units)), Month)<=5

merrillbrink
Contributor II
Contributor II
Author

Hi Soumya,

Thanks for the susggestion. Unfortunately, this expression is not returning any values however.