Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double Grouping 1

Status
Not open for further replies.

BlushingFBM

Technical User
Apr 30, 2009
6
CA
I am trying to do a simple double grouping example but I am having difficulty recalling how to do this.

I have a table that has login attempts for users that looks something like:
User Name | Login Date
User 1 | 1/14/2009 11:11:39 AM
User 2 | 1/23/2009 10:171:29 AM
Etc.

I grouped the data by Login Date for each hour and created a sum for the group which gave me:
2:00 am 6
3:00 am 8
4:00 am 8
(I also formatted the date field to only show me the time portion)

The issue is I have data that is repeated over and over again and would like one sum for a given hour. So I would like to apply another grouping so that I can collapse these multiple times and get a sum of logins for a given hour over multiple days.

Thanks,
Matt.
 
Instead of formatting the datetime, you should be grouping on change of hour (Formatting only changes the display--the report is still reading the detail times). This would keep the hours within a specific day. If you want a summary across days for the same hour, then you should instead use a formula to group on:

hour({table.datetime})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top