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: 
everest226
Creator III
Creator III

Min Rank

this is for Max rank , how to display lowest rank . i change to -1 somehow its not working

=concat ( distinct IF( aggr ( Rank(Count (DISTINCT [ user])), [Date Time])<=1, 

[Date Time] ), ', ' ,    num([Date Time]))

7 Replies
sunny_talwar

May be this:

=Concat (DISTINCT If(Aggr(Rank(-Count(DISTINCT [ user])), [Date Time]) <= 1, [Date Time]), ', ' , Num([Date Time]))

everest226
Creator III
Creator III
Author

=concat ( distinct IF( aggr ( Rank( Count (DISTINCT {<Year={'$(=max(Year))'}, Month={"$(=month(date#(max({<Year={'$(=max(Year))'}>}Month)-1,'MM')))"}>}[ user])), [Date Time])<=1, 

[Date Time] ), ', ' ,    num([Date Time]))

i was able to get rank 1 by following but when i try - in front of count it dosent work.

basically set analysis is to get current year last months data 

sunny_talwar

Can you create a chart

Dimension

[Date Time]

Expression

Rank(-Count (DISTINCT {<Year={'$(=max(Year))'}, Month={"$(=month(date#(max({<Year={'$(=max(Year))'}>}Month)-1,'MM')))"}>}[ user]))

What do you get?

everest226
Creator III
Creator III
Author

I get the lowest value but when i tried following on the text object it does not  show any value

=concat ( distinct IF( aggr ( Rank( -Count (DISTINCT {<Year={'$(=max(Year))'}, Month={"$(=month(date#(max({<Year={'$(=max(Year))'}>}Month)-1,'MM')))"}>}[ user])), [Date Time])<=1,

[Date Time] ), ', ' ,    num([Date Time]))

sunny_talwar

Are you expecting more than one value?? What is the reason to use Concat here if you are looking for Rank 1? May be you need < 2 instead of <= 1? I am just throwing out different ideas... not sure what might be causing this

everest226
Creator III
Creator III
Author

Yep expecting more than one value,.i am trying to capture lowest users visited to the  dashboard by date time in last months of current year. was able to get highest but somehow lowest is not showing up.

Anshu_Saxena
Contributor
Contributor

Hi Sunny,

Can we calculate Min or Max Rank from Rank measure in Qliksense. I am struggling on this since last 2 weeks as I am just starter for Qliksense.

 

Thanks,

Anshu