Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anindya_manna
Partner - Creator II
Partner - Creator II

Rank Caluculation Using aggr() functions

Hi all,

I am calculating rank in a table. my report looks like after selecting a dimension like below.

 

XYYTD salesXY RankY rank
9000119
8000227
7000583
6000
5000

Rank calculation is done based on this below expression.

XY Rank = Aggr(Nodistinct rank(sum({$<[Process Date]={">=$(=YearStart(Max([Process Date]))) <=$(=Max([Process Date]))"},

[Month ID]=>}[Sales Amt]),4),X,Y).

Y Rank=aggr(Nodistinct rank(sum({$<=,[Month ID]=,[Process Date]={">=$(=YearStart(Max([Process Date]))) <=$(=Max([Process Date]))"}>}[Sales Amt])),).

But the problem is when I am selecting other dimension like Month Id the rank calculation is not based on this particular month so by selecting a particular month rank is showing 1,2,3,6,9,12, like this as other position not part in this month so they removed.

But I want continuous rank based on each dimension selection.

2 Replies
anindya_manna
Partner - Creator II
Partner - Creator II
Author

When I am not selecting Month Id reports looks good. But when selecting any dimension like Month id its not showing desired result.

sunny_talwar

Try not to create duplicate thread for the same issue

Rank Caluculation Using aggr() functions