Compare finish date with target date

Would like to keep track of late Projects by comparing the finish date with the target date but are unable to do so. The idea is just to filter and count the summary tasks which have a later Finish date than the target date and present that as a the number
of late Projects. However it does not work, when trying to setup the filter Project tells that the target value can not be used for comparasion against the finish date.
Does anyone have a workaround or maybe a better solution to keep track of late Projects. Please note that we are talking about Projects that risk to be late compared to a date promised to a customer. When we plan we always add some extra time at the
end to have some extra when the Project is delayed at a certain department, however we want to keep track of how many late Projects we have and how late they are. Are not after seeing the status for each departments, only how we are doing in relation to what
we have promised our customers.
Kind regards //Anders

Anders,
Trevor and Dale have tried to steer you towards the normal tracking fields and methods already available in Project, but let me take a more direct approach to your exact question. First of all, you didn't tell us what field you are using as the "target date".
I'll assume it is the Date1 field manually entered for each summary line.
You could probably produce something close to the report you want with custom field formulas, filters and some manual counting but let me offer a more automated approach. The following macro will examine each summary task in your project and determine if
the finish date is before or on the target date (Date1), or if it is after the target date. If it is after the target date, that will count as one late project/order and add it to a running count of late orders. The difference in days will also be tracked
and added to a running total of delay. At the end, a message will appear in the exact format you describe.
Sub LateReport()
Dim t As Task
Dim LateCount As Integer
Dim LateDays As Integer
Dim TotDelay As Integer
For Each t In ActiveProject.Tasks
    If Not t Is Nothing Then
        If t.Summary = True Then
            If DateValue(t.Finish) > DateValue(t.Date1) Then
                LateCount = LateCount + 1
                LateDays = DateValue(t.Finish) - DateValue(t.Date1)
                TotDelay = TotDelay + LateDays
            End If
        End If
    End If
Next t
MsgBox "Number of late orders: " & LateCount & " (" & TotDelay & " days of total delay)"
End Sub
Note, in my view, and I'm sure in Trevor and Dale's also, the Finish field of the summary line does not indicate completion, it simply indicates the scheduled finish date of the last task in the subtasks under that summary. I think you should use the Actual
Finish date as the comparison value since it indicates when the project/order is complete. If you do decide, actual finish is a better choice, then substitute t.ActualFinish for t.Finish in the above macro.
My input.
John

Similar Messages

  • How to compare a Date data with Current Year and Period Member on FIX

    Hi experts,
    I have a Project dim that each member is a Project (P01, P02...)
    and Account dim that stores information of the each Project (Name, Start date, Finished Date...)
    Finished Date member is in Date data type
    So how can write a IF condition below in order to compare Project Finished Date with Current Year and Period members on FIX
    FIX (@Descendants(Projects), Descendants(All Year), Descendants("Year Total")...)
    IF (@CURRMBR(Period)->@CURRMBR(Year) < Project->FinishedDate)
    Do something...
    Else
    Do something
    Please help me on this. Sorry for my bad grammar. Please ask if there is anything unclear
    Many thanks,
    Huy Van.
    Edited by: Huy Van on Jan 29, 2013 1:14 AM
    Edited by: Huy Van on Jan 29, 2013 2:24 AM
    Edited by: Huy Van on Jan 29, 2013 2:25 AM
    Edited by: Huy Van on Jan 29, 2013 6:04 PM

    Here is what I have done. Post for whom may concern later
    VAR FM; /* Finished Month of Project*/
    VAR FY; /* Finished Year of Project */
    VAR CM; /* Capture Current Month on FIX statments */
    VAR CY; /* Capture Current Year on FIX statments*/
    FIX ( @RELATIVE( "Year", 0), @RELATIVE( "Period", 0), @IDescendants( "Base Projects")....)
    FY = @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 10000, 0);
    FM = @MOD( @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 100, 0), 100);
    /* For FY13 return 13... */
    CY = @JgetDoubleFromString( @CONCATENATE( "20", @SUBSTRING( @NAME( @CURRMBRRANGE( Year, Lev, 0, 0, 0)), 2)));
    /* Set CM value based on currrent Period On FIX statement */
    IF ( @ISMBR( "Jan"))
    CM = 1;
    ELSEIF ( @ISMBR( "Feb"))
    CM = 2;
    ELSEIF ( @ISMBR( "Dec"))
    CM = 12;
    ENDIF
    IF ( CY < FY OR ( CY == FY AND CM < FM))
    Do something...
    ELSE
    Do something...
    ENDIF
    ENDFIX
    Edited by: Huy Van on Feb 19, 2013 11:10 PM
    Edited by: Huy Van on Feb 20, 2013 7:46 PM

  • Planned order creation with PDS valid on only order start date and not finish date

    Hi All,
    We have requirement to allow creation of planned order manually if production version is valid on order start date and not finish date.  This is because lead time of order is longer. I refered OSS notes 385602. I could find out solution for this is implementation of OSS note 694140 to change validity mode at activity level to consider start date of first produce activity  in validity interval. Problem is even If I create order in APO by implementiong this note planned order is not transfered to ECC and it gets stuck with error production version not valid.
    Is there any way in ECC to control this? Any config or customization?
    Regards,
    Santosh

    Nilesh,
    I think there is a simple procedural skip happening in your business process. You are right when a planned order is created after MRP it would default assign it to the first available production version. 2options available for us,
    1. First use transaction MF50 and do the line loading and assign the quantites to the production versions/Production lines, so that the actual capacity planning is getting completed. This way you can have planned orders with both the production versions and matching to your actual line capacity.
    2. Use Quota arrangement concept, to automatically split the Planned orders during MRP for a percentage based on individual production versions.
    Now when backflush is performed S225 table is updated and Planned order qty also gets reduced.
    Hope this helps....
    Regards,
    Prasobh

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • Set Basic finish date in serviceorder with today + 10 days

    Hi,
    when we create an service order (IW31) the Basic start date and Basic finish date has default
    value of today.
    I will set Basic final date as default with today + 10 days.
    I have search in SPRO but don't find any way.
    Is there an EXIT or BADI to do this?
    thanks.
    Regards, Dieter

    Hi Paul,
    thanks for your answer, i have tried it, but no effect.
    I have to clear what i really want to have (sorry that i havn't done it in the first thread.
    First we create an Service notification via IW51, and go direct via "create" button to "create order".
    A little popup is shown to insert order type, planning plant, main work center. After press enter
    we are in create Service order (with revenues) at this time i don't insert any value.
    Now the value of "Basic start date" and "Basic finish date" has a value of today, it seems that these
    value are set as default, priority is empty.
    Now i want that the 2 date-fields are set as default with today and today + 10 days.
    How can i do this?
    Regards, Dieter

  • Comparing SQL Data Results with CSV file contents

    I have the following scenario that I need to resolve and I'm unsure of how to approach it. Let me explain what I am needing and what I have currently done.
    I've created an application that automatically marks assessments that delegates complete by comparing SQL Data to CSV file data. I'm using C# to build the objects required that will load the data from SQL into a dataset which is then compared to the
    associated CSV file that contains the required results to mark against.
    Currently everything is working as expected but I've noticed that if there is a difference in the number of rows returned into the SQL-based dataset, then my application doesn't mark the items at all.
    Here is an example:
    ScenarioCSV contains 4 rows with 8 columns of information, however, let's say that the delegate was only able to insert 2 rows of data into the dataset. When this happens it marks everything wrong because row 1 in both CSV and dataset files were correct,
    however, row 2 in the dataset holds the results found in row 4 in the CSV file and because of this it is comparing it against row 2 in the CSV file.
    How can I check whether a row, regardless of its order, can be marked as it does exist but not in the same order, so I don't want the delegate to lose marks just because the row data in the dataset is not perfectly in the same order of the row data
    in the CSV file???
    I'm at a loss and any assistance will be of huge help to me. I have implemented a ORDER BY clause in the dataset and ensured that the same order is set in the CSV file. This has helped me for scenarios where there are the right number of rows in the dataset,
    but as soon as there is 1 row that is missing in the dataset, then the marking just doesn't allow for any marks for both rows even if the data is correct.
    I hope I've made sense!! If not, let me know and I will provide a better description and perhaps examples of the dataset data and the csv data that is being compared.
    Thanks in advance....

    I would read the CSV into a datatable using oledb. Below is code I wrote a few weeks ago to do this.
    Then you can compare two datatables by a common primary key (like ID number)
    Below is the webpage to compare two datatables
    http://stackoverflow.com/questions/10984453/compare-two-datatables-for-differences-in-c
    You can find lots of examples by perform following google search
    "c# linq compare two dattatable"
    //Creates a CSVReader Class
    public class CSVReader
    public DataSet ReadCSVFile(string fullPath, bool headerRow)
    string path = fullPath.Substring(0, fullPath.LastIndexOf("\\") + 1);
    string filename = fullPath.Substring(fullPath.LastIndexOf("\\") + 1);
    DataSet ds = new DataSet();
    try
    if (File.Exists(fullPath))
    string ConStr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}" + ";Extended Properties=\"Text;HDR={1};FMT=Delimited\\\"", path, headerRow ? "Yes" : "No");
    string SQL = string.Format("SELECT * FROM {0}", filename);
    OleDbDataAdapter adapter = new OleDbDataAdapter(SQL, ConStr);
    adapter.Fill(ds, "TextFile");
    ds.Tables[0].TableName = "Table1";
    foreach (DataColumn col in ds.Tables["Table1"].Columns)
    col.ColumnName = col.ColumnName.Replace(" ", "_");
    catch (Exception ex)
    MessageBox.Show(ex.Message);
    return ds;
    jdweng

  • BOM Explosion with order finish date

    Hi,
    In transaction OPPQ it is possible to configure the BOM explosion date used by MRP and creation of a process order (see SAP NOTE 506345).
    I suppose this setting is also considered when re-reading master data during release of an order.
    The field BESAL can have the following values:
                BOM explosion number/order start date
    1     Order start date
    2     Order finish date
    3     BOM explosion number/order start date
    4     BOM explosion number/order finish date
    What I do not understand is that value 4 also end up in using the order start date when re-reading master data. Here the function module CO_ZF_VALIDATIONDATE_DET is called which contains the following coding:
    + Festwerte Feld BESAL:+*
    * ' ' Seriennummer/Eckstarttermin
    * 1   Eckstarttermin
    * 2   Eckendtermin
    * 3   Seriennummer
    IF T399D-BESAL <> CHAR2.
    * Auflösung mit Starttermin
    u2026
    ELSE.
    * Auflösung mit Endtermin
    u2026
    ENDIF.
    which says only use the Order finish date if BESAL has the value 2. The comment showing the possible values gives me the impression that SAP simply forgot to adapt this coding when splitting the value 3 (prev. only BOM explosion number) into 3 BOM explosion number/order start date and 4 BOM exlosion number/order finish date.
    On the other hand the SAP Note mentioned above documents this behaviour.
    Does anyone know the reason why value 4 (BOM exlosion number/order finish date) results in using the order start date ?

    hi,
    The defination in OPPQ is only working for the MRP, when the planned order is created.
    Then the explosion date will be copied from planned order to production/process order when you convert the planned order.
    However, when the production or process order is created manually, or when you do a re-read master data process, then a different BOM explosion date process will be carried out as described in the SAP note 506345, it has explained the behavior clearly base on the different value of paramter:
    V_T399D_S-BESAL = initial, 1, 3 or 4
    V_T399D_S-BESAL = 2 (Explosion with order finish date)
    So there is no problem to have different behavior of planned order and production/process order.
    Regards,
    Rachel

  • Update SharePoint list with project finish date on Project.Updated event

    Hello,
    I want to update a column in a SharePoint list with the project finish date when a project is updated on Project Server. My OnUpdated event handler is being called ok, but if I change the project start date Project Server runs an asynchronous republishing
    on the project, and my event handler ends up being called before the finish date is update by the republishing job, so the code writes the "old" finish date on the SharePoint list. The solutions I could think of are:
    Identify the republishing job on Project Server queue, pool the queue waiting for it to finish, then read the finish date and update the list item in SharePoint.
    Include a custom job on Project Server queue after the republishing job, that reads the finish date and update the list item in SharePoint.
    I don't know if any of the solutions are feasible and how to implement them. Has anyone coded something like this and/or have a better solution?
    Thanks,
    GB

    I vote for the option 1.
    I did for one of my event handler..Did you try "on published" event?
                projectSvc.QueueUpdateProject(jobUid, SessionUID, projectDss, false);
                //WaitForQueue(q, jobUid);
                jobUid = Guid.NewGuid();
                projectSvc.QueuePublish(jobUid, e.ProjectGuid, false, string.Empty);
                jobUid = Guid.NewGuid()
    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

  • Comparing AWR data with baselines.

    Hello,
    I am studying AWR, which will be used in our project for performance analysis.
    My requirement is to create a baseline of load between 2 snapshots during normal system load. We perform load/stress testing before final deployment. We are planning to take snapshots before and after load/stress tests. I want to compare the performance of instance during load/stress test with that of baseline performance.
    Oracle provides package DBMS_WORKLOAD_REPOSITORY for different functions of AWR. It provides function CREATE_BASELINE function for creating baseline. But in report generation function AWR_REPORT_HTML or AWR_REPORT_TXT no parameter is specified for comparing it with the baseline.
    Is it possible to compare AWR data with baseline, during report generation? Or currently Oracle supports only baseline creation and dropping that baseline. It can not be used for performance comparison.
    Thanks,
    Shailesh

    Hi,
    Take a look on the note: 543188
    With rgds,
    Anil Kumar Sharma .P
    Kindly Assign the points to the helpful answers.
    Message was edited by: Anil Kumar Sharma

  • How to compare Sale data with Previous data

    Hi Guys,
        Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
    Thanks & regards,
    Naveen Bhatia

    Hi Naveen,
    Did yo ucheck t-code SD01
    Regards
    Rohit.

  • "You can't compare a date with a number" in a formula that worked in Excel

    I opened in Numbers an invoice file which was created in Excel. Formula returns hours worked. It has an "if" condition for the date field. I am assuming that that is the reason I get this "You can’t compare a date with a number because their data types are different." What do I do?
    Formula reads =IF(SUM(A11)>0,(D11−C11),"") where A11 is a date and D11- C11 are times, ie 4PM and 5PM
    Message was edited by: iamzoran

    Jerrold Green1,
    I agree with your words about using Sum with a single cell [have no idea why the "creator" of the file did that]; same for the parentheses enclosing subtraction. Yet cleaning it up as you showed me [=IF(A11>0,D11−C11,"") ] I got the same comment
    "You can’t compare a date with a number because their data types are different."
    Makes me think that t quinn is on to something with his "think the issue is with the expression ">0". Could it be that >0 is the number referred to and <>"" and ISBLANK are not numbers?!
    z
    PS: I am so happy that I am able to use Spelling and Grammar Checker with Safari on these posts. I was born and raise in old Yugoslavia and I use the Checker with all my emails etc and its a life saver. hahaha

  • Compare - Current Data with Perious Data.

    Experts,
    We have created default report like below
    Date - Company - Product - SCode - Amt Spent - Net Amt - Calls
    12/12/2010 C1 P1 Code1 1000 1500 15
    13/12/2010 C2 P4 Code2 1500 1200 10
    12/12/2009 C1 P3 Code3 2000 1700 25
    11/12/2010 C3 P1 Code4 3000 1600 10
    11/11/2009 C2 P2 Code5 5000 3000 30
    Grand Total 12000 9000 90
    Here we are using Column selector for Date column to change the report from Date to Week (or) Month (or) Quarter (or) Year.
    My Questions
    1. I want to compare Default Date report with Perious Date, Last month Date and Last Year Date.
    2. If I select Month from Column Selector then I want to compare Month report with Last Month, Last year Month or Perious of Last year month.
    3. If I select Year from Column Selector then I want to compare Year report with Last year, or Perious of Last year and so on.
    Please help me, how can we achive the above task.
    Thanks in Advance.
    Balaa...

    Hello,
    First you have to define the new measures for last month, last year and so on. You can refer to this link:
    http://www.rittmanmead.com/2007/04/obi-ee-time-dimensions-and-time-series-calculations/
    After that, what you can do is instead of using a "Column Selector" you should use "View Selector". You can create different views, one for month, other for Year and include them into a "View Selector".
    After that you can add it in "Compound Layout".
    Regards,
    JorgeRS.

  • Compare current date with dat from db by JSTL

    hi all
    I use
    <tr><c:forEach items="${allFound}" var="found" varStatus="myRow">
    <td><c:out value="${found.submitDate}"/></td>
    </tr>
    </c:forEach>
    to past some value out of db
    how can I compare this submitDate with Current Date by JSTL
    Thank you!

    Whether or not you can compare it depends on what the type of "${found.submitDate} is coming from the Database.
    I am going to presume it is a java.util.Date.
    You can get the current date like this
    <jsp:useBean id="now" class="java.util.Date"/>
    You can then compare them using an EL expression:
    {code}
    <c:if test="${submitDate < now}">
    We have not yet reached the submit date.
    </c:if>{code}
    EL uses the java compareTo methods, so both of your objects +must+ be of the same class in order for this comparision to work.
    If you get back a String from the database, you would have to use <fmt:parseDate> to get a java date.
    If you get back a java.sql.Date from the database, it would get trickier. The hack would be to go java.sql.Date -> String -> java.util.Date using <fmt:formatDate> and <fmt:parseDate>
    Hope this helps,
    evnafets

  • Need advise - compare specified date in *.sql with sysdate.

    Hi Guys,
    Need help here.
    Anyone has a script that will compare the specified date with the current sysdate. If earlier, it will order SQL*PLUS to quit immediate.
    Basically the checking will be in a *.sql script. Whenever we run the script, @c:\script.sql, it will first compare the dates and decide whether to proceed with the rest of the codes (dml) below the date checker in the same script.sql
    thanks

    Hi,
    I'm not sure I understood as it seems too simple to me:
    set serveroutput on
    DECLARE
       v_date   DATE := TO_DATE('&yourdate', 'YYYYMMDD');
    BEGIN
       IF v_date >= TRUNC(SYSDATE)
       THEN
         /* Your DML statements here */
         DBMS_OUTPUT.PUT_LINE('Code is executed');
       ELSE
         DBMS_OUTPUT.PUT_LINE('Date is before SYSDATE.');
       END IF;
    END;
    EXIT
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Compare two dates with NULL in one

    I am trying to do the following with a simple SQL. Compare two dates and get the latest one, but the greatest() function always returns NULL if NULL is present. So how can I do it ?
    Date1 Date2 Desired Result
    Null 01-Dec-09 01-Dec-09
    01-May-09 01-Mar-09 01-May-09
    01-May-09 NULL 01-May-09
    01-May-09 01-Nov-09 01-Nov-09
    NULL NULL NULL
    Any suggestion ? Thanks

    Hi,
    Try this,
    create table test1
    fdate date,
    tdate date
    insert into test1 values (null,'25-jan-2010');
    select greatest(nvl(fdate,tdate),nvl(tdate,fdate)) greatest from test1;
    Thanks&Regards,
    Jai

Maybe you are looking for