Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan
MVP
MVP

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.
Labels (1)
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
MVP
MVP

Dimensions

1) MonthName

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

Expression

=sum([Amt])

vikasmahajan
MVP
MVP
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.