Calculate total empoyee days (as of present) that have elapsed for each month in a FY

Hello, everyone,
I'm running CF server connecting to an Oracle (11g)  db.
I have a table that keeps track of projects (past, present, future) and need a way to sum the days for each project, for each month, that have happened.
For example.
ID   -
Name         
-   Start
-   Stop 
- Employees
001
Project A     
01-Oct-14
31-Dec-14      
8
002
Project B     
06-Feb-15
21-Feb-15      
9
003
Project C     
30-Oct-14
29-Nov-14      
3
004
Project D     
26-Dec-14
16-Apr-15     
21
I'm trying to create an overview where the display will have the months of a Fiscal Year go across the page, indicating the number of employee days for each project that have elapsed. (NOT counting the current day).  New requirement: To make matters even more complex, there is a related table for the employees showing what dates they actually started and stopped (not every employee starts on day 1 and ends on the last day.. some start a day or two after the project start, etc.)
I'm not wrapping my head around this, for some reason. Mental block. Any ideas?
Someone in another forum suggested a PIVOT.  That's above my paygrade (I have never used PIVOT, don't understand how it works, etc.)
V/r,
^_^

This may be a good start. Display by Month Year the Average and Sum Dates between Start and Stop by Project.
SELECT      CAST    (
        (CAST(MONTH(Start) AS varchar(2)) + '/01/' + CAST(YEAR(Start) AS varchar(4)))
        AS DateTime
    AS DatePeriod,
    AVG(DateDiff(day, Start, Stop)) AS AverageDaysToClose,
    SUM(DateDiff(day, Start, Stop)) AS SumTotalDaysToClose,
    Name
FROM     Projects
GROUP BY CAST    (
        (CAST(MONTH(Start) AS varchar(2)) + '/01/' + CAST(YEAR(Start) AS varchar(4)))
        AS DateTime
    Name
ORDER BY DatePeriod, Name

Similar Messages

  • I am trying to find a tool that gives coupling for each class

    Hi,
    I am trying to find a tool that gives coupling for each class and not each package. I already generated the coupling at package level with tools like pmd, classycle, jdepend and metrics. Please let me know of any other tool that would do coupling at class level.
    Thank you

    without the space!
    http://forum.java.sun.com/thread.jspa?threadID=633089&messageID=3666280#3666280

  • I am now able to receive emails in MAIL, but Yosemite's Mail program does not recognize any of the server's connections that have worked for years!  What do I do next?

    Yesterday, I was unable to receive emails from Google but was able to receive them from another server - but then receiving them began to work again - but now I am unable to send any mail - Yosemite's Mail program does not recognize any of the server's connections that have worked for years, !  What do I do next?

    Mail troubleshooting - Yosemite
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • Help in finding the total count for each month

    Hello everyone,
    Sometime back I had posted about the date function. I have that problem solved now my problem is that after finding all records which against each record I need to find the total count for that month if no records than I have to set it to a 0.
    Here is how my program has been written.
    PROCEDURE extract_materials
    IS
    CURSOR xyz
    BEGIN
    FOR xyz1 IN xyz LOOP
    -- once inside the loop for each of the record from
    the cursor I need to find a total count for that record for everymonth in the year.
    All these records will be instered in to a staging table
    Can you please help me out with this. I really appreciate this.
    Thanks in advance.
    -Vani

    Andrew - you missed the tricky bit of the spec - include missing months with a zero.
    You need to do an outer join to a select from any big table with a function involving rownum and add_months to generate all the possible months. However, its time to go home and I can't be bothered to work out the finer details.

  • Can Time Machine retrieve Keynote presentations that have gone AWOL in the cloud?

    Does Time Machine store old icloud presentations? I had one and was going to back it up locally on my HD, and now it's missing from the cloud. I am hoping I can restore it somehow by locating it in Time Machine.
    I know I can restore earlier versions of a file if I have the presentation to open. I don't even have that in this case.

    1)  How Time Machine Works its Magic
    2)  How do I view or restore selected items?
    3)  How do I use the (not so intuitive) Time Machine display?
    From Here  >  http://pondini.org/TM/FAQ.html

  • Managing a set of documents that require approval, for each project stage

    Good day to all,
    I am new to SharePoint but I have dived in head first due to my job.
    The users I am dealing with need a solution where they can upload a specific set of named document types (example: project charter, site plan, schedule, costing approval, designs) but all documents will be scanned to PDF before being uploaded. Every stage
    will have its own set of documents with the same named document types. Each document has to be checked and the approved.
    I know I can use a workflow for the check and approve part.
    What I don't know is how to create a "blank" document set for uploading PDF files. In other words, I envisioned that I would have a document set of sorts where I can enter common information such as the Project Number, and the Project stage, and
    then I would have multiple upload fields that are named by the types above (project charter, site plan, etc.) so that the users will know exactly what documents are needed to complete the document set.
    Can anyone assist me in find a solution?
    Thanks and best regards.

    Hello,
    One thing to note is that the document set content type in SharePoint is analogous to a folder; you don't specify upload fields on the document set, but users can upload any number of documents to the set once it is created. You can have fields of information
    on the document set, and different fields of information on the documents within the set.
    With that in mind, the best way to accomplish what you're looking for may be to have columns on the document set that indicate which required documents have been uploaded.
    Document Set content type columns:
    Project Number (text)
    Project Stage (choice)
    Project Charter Complete (yes/no)
    Site Plan Complete (yes/no)
    Schedule Complete (yes/no)
    Costing Approval Complete (yes/no)
    Designs Complete(yes/no)
    Document content type columns:
    Document type (choice)
    It can either be a manual step so that when a user uploads a document, they then mark the corresponding yes/no checkbox, or it could be automated with a workflow.

  • I have several aps that are loading for two months now. I am afraid to erase them. What do I di to let them finish reload? One of them, is Skype and if I delete it it says it will delete everything I have on Skype. Any suggestions?

    Does anyone know how I can get four never ending loading aps that never finish loading? One of them is Skype. The other one is a gps ap for Spain.
    I don't want to delete them and re install for fear of losing all. I already lost hundreds of photos and many aps when my son by accodent did a sinc to the cloud and all was lost, went nowehere. I have not done any more sincs since. I just wnat these ps to finsh loading on my phone since I wantto use skype again in my phone.
    Thanks for any suggetsions.
    ana001

    There is nothing wrong with the OS update.
    Delete ALL your email accounts.
    Restart Playbook
    Put the accounts back and ensure they are all set with PUSH ON.  Manual (push off) will burn battery.
    Similarly delete your wifi connections and add back when required. 
    Turn off wifi is not connected to wifi. 
    Any "hunting for connection" in email or wifi will burn up battery.

  • Apple tv on 24- 02 launch wwe app in sweden secend day disapper why we oppen account wwe for six month now we lose the money wher i  contcet who is risponsbil for apple tv app

    Mark this discussion as

    Welcome to the Apple Community.
    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.
    Currently, if your purchase happens to be your most recent purchase you will need to click the large ‘Report A Problem’ button under the list of previous purchases in order to reveal the ‘Report A Problem’ link for your recent purchase. If your purchase is listed as a previous purchase use the small arrow on the left side of its listing.
    Alternatively you can use the receipt email to report a problem.

  • Is there a way to have one main cover artwork for an album that has artwork for each song?

    For example The Fall by Gorillaz has unique artwork for each song but when I'm in album view it only shows the artwork for the first song not the actual cover of the album. I'm wondering if there's a way for it to display the actual album cover in album view and the artwork for each song when it's actually playing.

    Generally all you need to do is fill in an appropriate Album Artist. For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    tt2

  • How to limit the number of emails that are shown for each account

    Hi, I'm going from iOS 6.1 to my new 5s iOS 7 and I wanted to know if there was a way to limit the number of emails shown for each of my accounts? In iOS 6 there is a setting "show" where you can choose how many you would like to be loaded at a time from 50-1,000 , is there a setting similar to this and I am just not seeing it? Please help me asap. I have only logged in 3 of my 12 email accounts and already have over 13k emails loaded...

    You can't limit it to the last 50 messages, but you can limit it to the last 1000 messages in each "folder" (label).
    Go to the Gmail website and click on the gear icon to the top-right side.
    Click on Settings.
    Click on the "Forwarding and IMAP/POP" tab across the top of the Settings area.
    Towards the bottom of the IMAP section, change the "Folder Size Limit" setting to "Limit IMAP folders to contain no more than this many messages". By default 1000 is selected, though you can also choose 2000, 5000, or 10000.
    Click Save Changes at the bottom.

  • How to calculate no of day in a month

    Hi All,
    I am have one cube in that i am getting only fiscalyear/period and variant.
    now my question is how calculate no of day in my fiscalyear/period (ex : 007.2010) this month of oct .is is possible in update rules.
    or it can be possible in report level
    for this i required ABAP logic any one help on this.
    Reagrds
    Anil

    In update rule / transformation write routine, in routine use function module /OSP/GET_DAYS_IN_MONTH. pass  period/month as input to routine/FM & output of this function module get into one variable & pass that variable to result.
    CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
      EXPORTING
        iv_date       = SOURCE_FIELDS-fiscper
    IMPORTING
       EV_DAYS       = days
    Result =  days
    Days is a variable declare locally in routine
    Edited by: Swapnil Dharia on Jan 14, 2010 2:36 PM

  • POS system reports daily totals for each store, not for each cashier

    Hi!
    We are implementing SAP Retail (ERP 6.0 EHP4 stack 3), SAP PI (Netweaver PI 7.1 SP 8) and SAP BW (NetWeaver 7.0 ehp1 stack 4, incl BI content 704, SP 3 ) for a client. Their POS system is a 3rd party system, i.e. not SAP POS.
    This issue concerns the fact that the POS system reports daily totals for each store, not for each cashier.
    At my client, the daily settlements are done for each cashier. At the end of day, we will get cash drawers counted with sum of each tender (cash and checks) at the end of day. In addition, the POS system will send sum of each tender, sum of all sales and sum of different finance transactions made each day. However, this u201Ctotals messageu201D is not sent separately for each workstation, or for each cashier, but rather for each store. So we only gets the totals per store.
    Questions:
    i)     Are the tasks available for comparing totals to the aggregates for POS transaction able to handle u201Cstore-only figuresu201D?
    ii)     If not, how can we adapt the tasks so they can handle u201Cstore-only figuresu201D?
    iii)     Can we trigger outbound tasks sending WPUUMS and WPUTAB using outbound dispatcher automatically, or must we run this as a manual task of an employee, after checking that all stores have delivered their totals?
    iv)     The u201Cstore-only figuresu201D does not include cashier statistics. Do we need the u201Ccashier statisticsu201D as total figures, or can we just populate the BAPI for each POS transaction with data, in order to populate BW infocubes for cashier statistics?
    Thanks for any advice !
    Best regards,
    Oeystein Emhjellen

    Hi Kees ...
    Your profile indicates you are running Leopard v10.5.8
    You need to upgrade to Snow Leopard V10.6 in order to use the App Store. This is an "upgrade", not an "update".
    Make sure your Mac meets Snow Leopard's requirements here.
    You must have the minimum of v10.6.6 installed in order to access the App Store.
    You can purchase Snow Leopard here > Mac OS X 10.6 Snow Leopard - Apple Store

  • How do I find the start day of each month

    Hi all,
    Hope someone can give a a hand here I've to do a calender project for college and I'm not allowed to use any built in Java classes so fun all the way so far :-)
    I've got one question that is bugging me at the moment. and that is how to find the start day for each month in a year and store them in an array.
    I'm starting my week at Monday (0) and stopping at Sunday (6) and I do have a formula for discovering the first day in Jan of the given year its
    ((y-1900)*365 + (y-1901)/4)%7
    I was just wondering how I could amend this to find the first day in Feb, March etc.
    Any suggestions greatly accepted.
    Thanks in advance.

    Irish-Student wrote:
    newark maybe I didnt make clear exactly what I want to do.
    I have each day of the week starting at 0 for Monday up to 6 for Sunday I want to map what the start day of a month as a number between 0 and 6.
    The formula I have discovering the first day of Jan of a given year will give you 1 i.e. Tuesday
    what I need to do is find out what number between 0 and 6 the start day of each other month of a given year is.
    For example the 1st of Feb is a Friday which is 4 on the weekday map.
    Your suggestion of 31%7 won't work for this, sorry more than likely my fault for not being clearer in what my requirements were.
    Cheers for the help so far and yep your right not being able to use the built in classes is a pain :-)
    Edited by: Irish-Student on 03-Mar-2008 20:01This doesn't really change much of my first suggestion. If you can already calculate the first day of the month of January for any given year, then there's no problem figuring out the other months. Say I want to know the first day April 1, 1978. You already know how to find January 1, 1978. So find that. Then find the number of days between January 1 and April 1 (remember to account for leap years). Once you have the number of days, you can figure out how many weeks and days that is, and thus what day of the week it is.

  • Creating charts that represent current year in Months in order to show YTD performance by month

    I continue to struggle with what, to me, seem to be the simplest things in SSRS.  I have spent over two days trying desperately to get a chart to properly show the quantities of Manufacturing Orders that we have made each month, Year To Date. 
    Below is the closest I’ve been able to come and the axis is still off by one month and not in sync at all with my data. 
    Then when I run the report for other part numbers, that only have MO’s in say two months (Jan & Jun), they don’t even behave scalar and I get the following screwed up mess.  Notice the two columns have decided to fill most of the scale and they
    did not skip the four months between Jan and Jun and they also are completely out of sync with my scalar x-axis!
    My goal is to create a chart that can be run for any part number on any day and show how many times it has been built during the current calender year.  Chart should always show months of current year starting Jan on left and ending with Dec on
    right (even if I am running report in February for example).  Then for each month that we have data, it should show the QTY on the column chart and leave blank columns for months with no data.
    Can anyone help me with this? 
    Chris

    Hi Chirs,
    From your desription, you want to createa a chart to show all the months on the chart no matter it has data on that month or not, rigth? If in this case, we can create an other dataset to show all the month, and then use the lookup function to get the month
    QTY. The steps below are for you reference.
    Create an other dataset use the query below.
    DECLARE @TMP TABLE (Month nvarchar(20),QTY INT)
    INSERT @TMP SELECT 'Jan',0
    INSERT @TMP SELECT 'Feb',0
    INSERT @TMP SELECT 'Mar',0
    INSERT @TMP SELECT 'Apr',0
    INSERT @TMP SELECT 'Mat',0
    INSERT @TMP SELECT 'Jun',0
    INSERT @TMP SELECT 'Jul',0
    INSERT @TMP SELECT 'Aug',0
    INSERT @TMP SELECT 'Sep',0
    INSERT @TMP SELECT 'Oct',0
    INSERT @TMP SELECT 'Nov',0
    INSERT @TMP SELECT 'Dec',0
    SELECT * FROM @TMP
    Drag [Month] filed to Category Groups and drag [QTY] field to Values.
    Then change the of [QTY] to:
    =Lookup(Fields!Month.Value,Fields!Month.Value,Fields!QTY.Value,"DataSet1")
    The report looks liek below.
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. years each month.

    I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but need to report each month.

    Hi Tony,
    Answering your question would be easier given a screen shot of the source table and one of what you want the summary table to look like.
    Is the data you want for each month in a single cell o the source table, or does the summary table need to collect February's data (for example) from several cells and do some math with those numbers before presenting them on the summary table?
    Regards,
    Barry

Maybe you are looking for