Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Group records with custom yearly grouping

Posted on 2013-07-01
Medium Priority
480 Views
Hi Experts,

I am creating a report where I need to group records yearly but it needs to depend on a specific date.
More in detail, my report is pulling employee records for their hours paid.
I need to show a total of hours paid yearly on the date he/she was hired

So if an employee was hired on 7/1/2010 then it needs to group and total as follows:

Range                                    Total hours paid
======                                  ===============
7/1/2010 - 6/30/2011                    456
7/1/2011 - 6/30/2012                    789
7/1/2012 - 6/30/2013                  1012

If you could guide me to the proper grouping formula I need to create I would really appreciate it

Thank you

CRM
0
Question by:carlosmonte
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 2

LVL 101

Expert Comment

ID: 39291596
How many years are you looking to see?

mlmcc
0

LVL 1

Author Comment

ID: 39291610
since the employee started, so date of hire
if they started in 1999 then from 1999 to today
0

LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 39291633
Try a formula like this

``````Local DateVar SaleYearStart := Date({Employee.Hire Date});
Local DateVar SaleYearEnd := Date(DateAdd('yyyy',1,{Employee.Hire Date}) - 1);
While SaleYearEnd < {Orders.Order Date} do
(
);

CStr(SaleYearStart,"M/d/yyyy") &  " -  " & CStr(SaleYearEnd,"M/d/yyyy")
``````

mlmcc
0

LVL 1

Author Comment

ID: 39291684
Seems to be working perfectly :)
I will test thoroughly and get back to you asap

Thanks!
CM
0

LVL 49

Expert Comment

ID: 39351313
I've requested that this question be closed as follows:

Accepted answer: 500 points for mlmcc's comment #a39291633

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

LVL 1

Author Closing Comment

ID: 39351314
The solution has worked great.
Thank you mlmcc!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
###### Suggested Courses
Course of the Month11 days, 12 hours left to enroll