Quarter End date duplicate value issue in pivot

Hi gurus,
     I have a requirement to show the working hours and utilization of an employee. I have these three fields
Employee Name
Week Start Date
Year (Based on Week Start Date)
Quarter (Based on Week Start Date)
Effort Logged Date(Date in which the employee has logged the effort for)
Hours Logged Type(Different Types like Billable , Non Billable, etc )
Hours Logged(Effort logged per day)- Summed up and taken as Hours Worked
Normal Working Hours Per Week (Week aggregated value Eg. This value will be 40hrs for a particular employee per week)- Taken as Hours Available
For every single Effort Logged Type , there will be a row in my final table.
ROW_WID
EMP_NAME
WEEK_START_DT
EFF_LOG_DT
HRS_TYPE
EFF_LOGGED
NORMAL_HRS
1
Niranjan
29/09/2013 -DD/MM/YYY
30/09/2013
Billable
7
40
2
Niranjan
29/09/2013
30/09/2013
Non Billable
8
40
3
Niranjan
29/09/2013
1/10/2013
Travel
8
40
My job is to show the data like this(I am using a pivot)
Year
Quarter
Hours Available
Hours Worked
2013
3
640
635
4
680
679
When I do this, since the week start date falls under Quarter 3 and the effort logged date is spread across Quarter 4, the Hours available is getting duplicated, 40 is added to both quarter 3 and quarter 4. How to avoid this? 
Ideally the hours logged for 29/9/2013 should be divided by normal hrs/5 (ie. 40/5) to get the utilzation correct. How to find the quarter endings and solve this issue?

Hi Can you please share the query that you used to show the above output.

Similar Messages

  • Quarter End date for this period

    Hi
    I have current date, How could I get the quarter end date for this date.
    for example
    Jan 23 2005 - The quarter end date is Mar 31 2005.

    needs testing
    import java.util.Calendar;
    import java.text.SimpleDateFormat;
    class Testing
      public Testing()
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.MONTH,3-(cal.get(Calendar.MONTH)%3));
        cal.set(Calendar.DAY_OF_MONTH,0);
        System.out.println(sdf.format(cal.getTime()));
        cal.set(2005,10,15);
        cal.add(Calendar.MONTH,3-(cal.get(Calendar.MONTH)%3));
        cal.set(Calendar.DAY_OF_MONTH,0);
        System.out.println(sdf.format(cal.getTime()));
      public static void main(String[] args){new Testing();}
    }

  • Need to use Value of End Date Prompt Multiple Times

    I have a date field (Ex: Tablename.RDate) that needs to be entered by the user. So, I created a prompt (Begin and End Dates) that the user will enter.
    I need to have a second date field (Ex: Tablename.TDate) that needs to use the entered value of the End Date from the first prompt.
    (I need to check for TDate being equal to or greater than the value entered in the RDate End Date prompt. I don't want the client to enter in a begin and an ending date and then have to turn around and enter in a termination date which would be the same as the ending date).
    So my question is how do I accomplish this without having a TDate prompt? How can I use the RDate Entered Ending Date prompt value multiple times in my report?
    I thought about a second prompt but I don't know how to direct it to the entered value for the 'End Date'. I am fairly new at this so please go slow and be detailed with your answer if you can. Thanks in advance

    I think you have to make use of an exit (EXIT_SAPLMEKO_002)  or a BADI (ME_PO_PRICING_CUST)

  • How to use Schedule End Date in work flow

    I want the delete pages from Page library after the “Schedule End Date” is reached.
    I used workflow, but the “Schedule End Date” column values always returns 1/1/1000 in workflow.
    I am unable to get the actual “Schedule End Date” value form the pages.
    Any help
    with Regards Sivam

    Hi Siva 2013,
    I made a test in my environment and I reproduce your issue.
    By default, it is a hidden field. I make the field unhidden using SharePoint Manager. I set the field with a specific value, and I create a workflow to log the value. But, it always show "0001/01/01".
    As a workaround, I suggest you can filter the items using CAML Query and delete them using Client Object Model.
    I suggest you can filter the items using CAMLDesign.
    More information:
    Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/ee539976(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    CamlDesign:
    http://www.camldesigner.com/
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • Updating service contract line item's end date

    Hi,
    I am trying to extend the end date on a line item in a service contract via the DI and it is giving me the following error:  'Item's end date cannot be greater than contract's end date' and I don't understand why.
    I retrieve the service contract object, change the header end date then find the line item  I need, update it with the same end date and then issue call the SC update method.  Here's my code:
        Try
                 SC.Lines.SetCurrentLine(SerialNbrLineNumber)
                 NewStartDate = LineEndDate
                 'calculate new end date & extend service contract
                 NewEndDate = NewStartDate.AddYears(Warranty_Duration)
                'never make the contract end date earlier than it had been
                SC.EndDate = IIf(NewEndDate > SC.EndDate, _
                                                             NewEndDate, _
                                                             SC.EndDate)
                'update service contract detail with new end date
                 If NewEndDate > LineEndDate Then
                     SC.Lines.EndDate = NewEndDate
                 End If
                 If SC.Update() <> 0 Then
                    rs.RtnCode = -1
                    rs.RtnMessage = B1Comp.GetLastErrorDescription()
                 End If
    I did see something in the di help that mentions that B1 calcs an end date based on the "duration of coverage" field but I don't think I could use that because I might only change the end date for one line item. 
    BTW I can do this in the application with no problem.
    Thanks in advance for any assistance.

    Known B1 bug.  Should have checked support first.  More info on note # 1026540

  • Start/End Date parameters that check day of week and using to set default values.

    Hi,
    I've got a report that presents data between a start and an end date.
    I want it to check if it's a monday and present data from the previous week, otherwise present data from this week.
    For the "Default" value of parameter @startdate, I've got the following expression:
    =iif(WeekdayName(DatePart("w", Today)) = "Monday",DateAdd("d",-8,Today()),DATEADD("d", 1 - DATEPART(DateInterval.WeekDay, Today(),FirstDayOfWeek.Sunday), Today()))
    for @enddate I've got default value:
    =iif(WeekdayName(DatePart("w", Today)) = "Monday",DateAdd("d",-1,Today()),DATEADD("d", 7 - DATEPART(DateInterval.WeekDay, Today(),FirstDayOfWeek.Sunday), Today()))
    but it doesn't appear to be working, I've checked 
    WeekdayName(DatePart("w", Today))
    as an expression in a text box and it evaluates to Monday but my IIF statement above always uses the DATEADD line therefore not returning "Monday" as the value (even though it is).
    Is it a problem that the parameters are of Data/Time data type and I'm trying to evaluate as type text?
    Any help would be appreciated.
    Thanks :)

    StartDate
    =IIf(DateDiff(DateInterval.Day,CDate("01/01/1900"),Today) Mod 7 =0,DateAdd(DateInterval.WeekOfYear,DateDiff(DateInterval.WeekOfYear,CDate("01/01/1900"),Today)-1,CDate("01/01/1900")),DateAdd(DateInterval.WeekOfYear,DateDiff(DateInterval.WeekOfYear,CDate("01/01/1900"),Today),CDate("01/01/1900")))
    EndDate
    =IIf(DateDiff(DateInterval.Day,CDate("01/01/1900"),Today) Mod 7 =0,DateAdd(DateInterval.Day,-1,DateAdd(DateInterval.WeekOfYear,DateDiff(DateInterval.WeekOfYear,CDate("01/01/1900"),Today),CDate("01/01/1900"))),DateAdd(DateInterval.Day,-1,DateAdd(DateInterval.WeekOfYear,DateDiff(DateInterval.WeekOfYear,CDate("01/01/1900"),Today)+1,CDate("01/01/1900"))))
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    Hi, 
    This one works but it results to be between monday and saturday, how to make it between sunday and saturday?

  • Billing plan value with reference to start & End date

    Hi Experts,
    Request your earliest support for the achieving the below requirement.
    Scenario:We have Billing plan set up for the all contracts - valid for one year.Monthly rental amount for each contract item is maintained as base price for the contract. When the billing plans starts in the middle of the month then, the billing value need to be calculated only for the relevant no of days in 'settlement' and 'To' date of billing plan. How to achieve this?     
    Net value of the contract item
    Net value of the item   102.00  GBP     
    Tax  for the item         15.30          
    Net value of billing plan for the contract item                                                                                .
    Item Net value  408.00                GBP                                                         
    Billing plan and contract validity details for contract item                                                                               
    Billing Plan Type - PM- Monthly in Advance                                    51- Monthly on First of                                                   
      Contract Start date       07/15/2009 (02)-Contract Start Date        Billing plan Dates from  07/16/2009  02                                    
      Contract plan End date 10/14/2009 (09)-Contract End Date          Billing plan Dates until 10/14/2009 09                                    
      Horizon -                                                                                Cal-Id - 01                                                                               
    Dates                                                                               
    Settlement       To                      Billing date         Bill.value    Crcy  Block  BillSt  Man.  Cor  PayT  DCat  Billing Ty  Price cal           
       07/16/2009      07/31/2009        08/01/2009         102.00       GBP   FA     A                                   01      ZC           01 -
    > This needs to calculated upon net value for 16 days only   
       08/01/2009      08/31/2009    09/01/2009              102.00       GBP   FA      A                                 01      ZC            01--->           between 07/16/2009 to 07/31/2009=102/31*16 = 52.65
       09/01/2009      09/30/2009   10/01/2009               102.00       GBP   FA      A                               01      ZC            01                  
       10/01/2009      10/14/2009    11/01/2009              102.00       GBP   FA      A                               01      ZC            01                                                                               
    Please suggest if this can be achieved through Billing plan configuration or any user exit that can be used to resolve the issue.
    Thanks,
    Priyabrata

    as far as I know there is NO such standard report.
    you would try to build sap query based on VBAK/VBAP using VBFA checking LIKP/LIPS and VBRK/VBRP...
    but you may request abaper for more professional report with MKPF/MSEG and BKPF/BSEG

  • Start Date,End Date prompt issue

    Hi
    I have a problem for prompts related to start Date and End Date selection i.e
    Start Date                   End Date
    01-Jan-2007                 31-Jan-2007
    01-Jul-2008                  31-Jul-2008
    The issue is if the user select the Start Date from a list of values(prompt) the End Date LOV's should appear only from its related Start Date i.e
    If Start Date is selected as 01-Apr-2007 then End Date LOV's should start only from 30-Apr-2007
    and the End Date LOV's should be seen only for the next 12 months i.e only till 31-Mar-2008
    Please suggest me how I can resolve this prompt issue

    hi there,,
    you can not do that at the prompt form
    coz every prompt is independent from the other.
    good luck
    Amr

  • Query to find the start and end date of current quarter

    I want a query to give me the start date and end date of current quarter
    I don't want to use TRUNC and ROUND as the 16th day roundoff logic is not required.
    Thanks in advance.

    Hi ,
    I'm quite sure that the year quarters are static.....
    So , you can save them as records of a table , such as:
    QRTY START_DAY END DAY
    ============================
    1 1/1 30/3
    2 1/4 30/6
    3 1/7 30/9
    4 1/10 31/12
    The sysdate(day of the current quarter) must be between a start_day and appropriate end_day of the quarters, concatenated with the sysyear (year of the sysdate).
    So , if the above table is called Quarters ...
    then
    select start_day , end_day
    from quarters
    where to_date(sysdate,'dd/mm/rrrr') between (to_date(trim((start_day||'/'||to_char(sysdate,'rrrr'))),'dd/mm/rrrr'))
    and (to_date(trim((end_day||'/'||to_char(sysdate,'rrrr'))),'dd/mm/rrrr'));
    [b]Result
    START_DAY END_DAY
    1/10 31/12
    Regards,
    Simon
    Message was edited by:
    sgalaxy
    Message was edited by:
    sgalaxy

  • Why the delivery date is the same date as 'transptn plan date" & loading date' & ' good issue' & GR end date'

    Hi Experts,
    why the delivery date is the same date as ‘transptn plan date” & loading date’ & ‘ good issue’ & GR end date’.
    in shipping tab i can see Planned Deliv. Time  170 Days ... wat could be the reason.
    Many Thanks:
    Raj Kashyap

    Hi Jurgen,,
    Thanks for quick reply!!
    But i didnot find any things like that .. what could be the customizing .. and we are using GATP from APO side.
    \Raj Kashyap

  • Duplicate responsibility on end date

    Hi,
    We have EBS 11.5.10.2 on AIX servers. When I try to end date one responsibilty it ends but it duplicates and I can not end the new one. I checked metalink and found patch 5121512 which is superseded by patch 6241631.
    I am a newbie and I dare not try to apply this patch which will be hard for me because of the prerequisite patches and mini-packs. So what I want is to learn which table(s) hold these user responsibility data and what will be the outcome if I directly delete this data? Is there any other non-patch workaround to this problem(any scripts etc.)?
    I will be very grateful for any help. Thanks.
    Burak

    Hi,
    I am a newbie and I dare not try to apply this patch which will be hard for me because of the prerequisite patches and mini-packs. So what I want is to learn which table(s) hold these user responsibility data and what will be the outcome if I directly delete this data?Do not update the tables directly as this is not supported. Instead, clone your production instance, and apply all the necessary patches on this new cloned instance, test the instance after patching and make sure all work properly, then apply the same patches on your production instance.
    Is there any other non-patch workaround to this problem(any scripts etc.)?Log a SR and check with Oracle Support if there is any workaround you can implement to avoid applying those patches.
    Thanks,
    Hussein

  • Duplicate responsibility if end date is applied on responsibility

    Dear All
    We are facing strange problem in Oracle Applications 11.5.9. When ever we apply end date to any responsibilty , it then duplicate the same responsibilty one with end date and the other is open, and user can still use the responsibilty.
    Your help is really appreciated. thanks in advance
    Cheers

    You need to apply patch (5121512) then run the concurrent request "Workflow user/role validation".
    Refer to Note: 403385.1 for more details

  • How to find the start and ending dates of a quarter of a particular fiscal

    Hi Experts,
    I need a function mudule which returns starting and ending date s of a particular quarter of a particular fiscal year .
    For Example: if pass 1 quarter and 2002 or 2 quarter 2002 it has to give me the star and end dates of that particular quarter na d fiscal year.
    Please help me which is urgent for me.

    Hi Kishan thanks for reply.
    But given function module the 2nd one is full but it is giving me the calender year dates but i need fiscal yea dates.
    fro example: if i pass 1 st quarte and 2006 it is to give me the 1st-april to 30-jun2006.
    And need this quater starting date and ending date for as per USA fiscal year calender.
    If u get any idea plz let me know.
    thanks.
    Dashmantha.

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • Infotype 0008-End date issue

    Hi
    Whenever my client wants to delete  a wage type in infotype 0008 ( Basic pay ), they are not getting the end date 31/12/9999 , they are getting the current month as the end date ( For example if we delete a wage type on 01/06/2009 , the end date should be 31/12/9999 ,but here we are getting 30/06/2009 )
    Thanks in Advance .

    IT008  is haveing TC  1
    say
    if the salary of an employee is  10,000
    he joined in the month of jan 2009 
    It0008
    Begda  01.01.2009  endda  31.12.9999  because his salary will not changed on monthly basis right unles and untill if he has any increment or promotion for this we have to run the Actions
    so kidnly check if thee is any master data problem or  TC problem for IT008  in V_T582A
    if it gets changed in the march
    the record shd be  delimited for the month of FEB 
    01.03.2009  31.12.9999
    0101.2009  28.02.2009

Maybe you are looking for

  • Videos pause when i connect external sound card

    Hey guys, this problem started a week ago -+, before, everything worked perfectly. but in the last week, i can watch video's on youtube or hear songs on Rdio then pause them  connect the card and then when i press Play it shows a loading sign til i d

  • Passing Values to a User Form called from a button

    Good Afternoon Experts: Recently, Edward Neveux pointed me in the direction of how to find information on displaying a Form when clicking a button on a screen.  I use this line of code to show a screen after clicking on a button on the Item Master Da

  • Dynamic variants for a background job

    Hi, I need to set up a background job for a dynamic variant. To elaborate my selection screen has date ranges which need to change dynamically , if the job is secheduled on weekly basis the selection date range should change automatically in the vari

  • Scroll bar has lost zoom function

    Hi I'm using LP 9.1.7 Since I upgraded to Mountain Lion, my scroll bar zoom function has vanished. It's there in Waveburner. I can't find any preferences that can help me. Any help greatly appreciated -- I use tyhis function all the time and I'm lost

  • CONFIGURATION STEPS FOR ADOBE INTERACTIVE FORMS

    Hi, I am developing some quotation application . I need to configure adobe interactive forms  can any one tell me step by step configuration. Regards, Gurprit Bhatia