7 Replies Latest reply: Mar 5, 2015 4:46 PM by Massimo Grossi

# Max number of hits within a time range

Hello all,

I have almost 120K records (hits) within 6 months. I need to know what day had the max count of hits.

I need this to be static (fixed value) during other calculations.

The fields I have for this:

ID_hits

num(floor("FechaHora")) as DateFLOOR

• ###### Re: Max number of hits within a time range

Use below in Text Box

=Date(FirstSortedValue(DateFLOOR, -Aggr(COUNT(ID_hits),DateFLOOR))

or

=Date(FirstSortedValue(DISTINCT DateFLOOR, -Aggr(COUNT(ID_hits),DateFLOOR))

• ###### Re: Max number of hits within a time range

Hello Manish, let me add this image so I can explain better.

As you can see, the graph is sorted by date and the max number of hits were obtained 02/03/15 (2,557).

The 2,557 is the value I want to display and this should be a fixed value as I want to compare by the best day in terms of traffic (hits).

• ###### Re: Max number of hits within a time range

=FirstSortedValue(DISTINCT Aggr(COUNT(ID),DateField), -Aggr(COUNT(ID),DateField))

• ###### Re: Max number of hits within a time range

works perfect, 2,557 is the value I get.

last question, how do I set it as FIXED (constant)

thanks a lot!!!

• ###### Re: Max number of hits within a time range

=FirstSortedValue(DISTINCT Aggr(COUNT({1}ID),DateField), -Aggr(COUNT(ID),DateField))

• ###### Re: Max number of hits within a time range

or

=FirstSortedValue({1}DISTINCT Aggr(COUNT({1}ID),DateField), -Aggr(COUNT({1}ID),DateField))

• ###### Re: Max number of hits within a time range

=subfield(concat({1} aggr(only({1}DateFLOOR),DateFLOOR),'@', -aggr(count({1} ID),DateFLOOR)), '@', 1)