Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Rank Question

Hii,

I have following expression to calculate Top nos group1 wise 

IF(Aggr(Rank(sum([Amt]),4),[Group1])<=vTopNos,[Group1]))

Now I want to calculate top nos using monthname it is linked to calendar

How to calculate rank with 2 dimensions.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
4 Replies
sasiparupudi1
Master III
Master III

this?

IF(rank(Aggr(sum([Amt]),[Group1],[Month]),4)<=vTopNos,[Group1]))

MK_QSL
MVP
MVP

Dimension

Field1

Field2

Expression

SUM(Aggr(IF(Rank(SUM(FieldName),4)<=vTopNos,SUM(FieldName),Field1,Field2))

Kushal_Chawda

Dimensions

1) MonthName

2) Aggr(IF(Rank(SUM([Amt]),4)<=vTopNos,[Group1],MonthName,[Group1])

Expression

=sum([Amt])

vikasmahajan
Author

Thanks for reply I have resolved it by storing top nos ids in variable and used same in set analysis.

V_VAL:

=CONCAT(IF(Aggr(Rank(sum([Amount]),4),[Group1])<=vTopNos,[Group1]),',')

used in set analysis like  Sum({< Amount = {'XYZ'},[Group1]={$(=V_VAL)} >} Amount)

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.