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: 
EliGohar
Partner - Creator III
Partner - Creator III

Finding the hour with the maximum number of object by date

Hello everyone,

Assuming I have the following aggregated data:

DateHour# of Objects
06/25/1906:0010
06/25/1907:0015
06/25/1908:0020
06/25/1909:0025

 

To retrieve the maximum "# of objects" by date and hour, I'm using this expression:

 

=Max(aggr(count(ObjectID),Date,[Hour (hh)]))

 

It gives me the correct value (25), but I also want to find the relevant hour (09:00). 

Can you assist me with this expression?

Thanks in advance,

Eli.

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

HI 

this should do the trick 

=firstsortedvalue(aggr([Hour (hh)],Date,[Hour (hh)]),-aggr(count(ObjecID),Date,[Hour (hh)]))

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

HI 

this should do the trick 

=firstsortedvalue(aggr([Hour (hh)],Date,[Hour (hh)]),-aggr(count(ObjecID),Date,[Hour (hh)]))

EliGohar
Partner - Creator III
Partner - Creator III
Author

@lironbaram 

Toda 🙂

lironbaram
Partner - Master III
Partner - Master III

על לא דבר