Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
EliGohar
Partner
Partner

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.

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner
Partner

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
Partner

HI 

this should do the trick 

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

View solution in original post

EliGohar
Partner
Partner
Author

@lironbaram 

Toda 🙂

lironbaram
Partner
Partner

על לא דבר