Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Gowtham
Contributor III
Contributor III

Qlik Sense Top 5 Rank based on Drill down Dimension

Hi All,

I have an expression to find ranking based on drilldown dimension below. Its working and I want to show only Top 5 Rank. My drill down dimensions are Country,State and City

if(GetSelectedCount(CalDate)=0,
(rank(aggr(Count({<Entry-={$(vElectronic)},Profileadddate_MonthName={'$(=$(vCurrMnthProfiles))'}>}Entry)
/
Count({<Profileadddate_MonthName={'$(=$(vCurrMnthProfiles))'}>}Entry),$(vRankDrill_Profile)),4,1)),
(rank(aggr(Count({<Entry-={$(vElectronic)},Profileadddate={">=$(=Date(Min(CalDate)))<=$(=Date(max(CalDate)))"}>}Entry)
/
Count({<Profileadddate={">=$(=Date(Min(CalDate)))<=$(=Date(max(CalDate)))"}>}Entry),$(vRankDrill_Profile)),4,1))
)

Can anyone help me to limit my ranking to Top 5

Thanks in Advance

1 Reply
Anil_Babu_Samineni

Try this?

if(GetSelectedCount(CalDate)=0,
(rank(aggr(Count({<CalDate = {"=Rank(Count(Entry),4)<=5"}, Entry-={$(vElectronic)},Profileadddate_MonthName={'$(=$(vCurrMnthProfiles))'}>}Entry)
/
Count({<CalDate = {"=Rank(Count(Entry),4)<=5"}, Profileadddate_MonthName={'$(=$(vCurrMnthProfiles))'}>}Entry),$(vRankDrill_Profile)),4,1)),
(rank(aggr(Count({<CalDate = {"=Rank(Count(Entry),4)<=5"}, Entry-={$(vElectronic)},Profileadddate={">=$(=Date(Min(CalDate)))<=$(=Date(max(CalDate)))"}>}Entry)
/
Count({<CalDate = {"=Rank(Count(Entry),4)<=5"}, Profileadddate={">=$(=Date(Min(CalDate)))<=$(=Date(max(CalDate)))"}>}Entry),$(vRankDrill_Profile)),4,1))
)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)