cancel
Showing results for 
Search instead for 
Did you mean: 

How to select only record with highest total?

Former Member
0 Kudos

I have a list of records with date and total as below:

Date Total

3 May 0

5 May 2

5 May 3

5 May 8

6 May 2

6 May 4

If i only want to select records with highest total for each date, how would l do the record selection?

This is what i want to do:

Date Total

3 May 0

5 May 8

6 May 4

Appreciate some feedback. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can have this directly in your query

select date, max(total)

...

group by date

as every report is based on the query

Former Member
0 Kudos

sorry....forget to tell you that the Total field in the report is actually a running total field. So i dont think sql query can make use of this field.

Former Member
0 Kudos

What are the conditions of your Running Total.

How is report grouped to give you sub totals within a date.

Ian

former_member292966
Active Contributor
0 Kudos

Hi,

If you can change the running total to a formula then summarize that formula, you can do a Top N sort or Group Selection Formula on the summary.

Running totals don't allow very much flexibility after they are generated.

Good luck,

Brian

Answers (0)