Cal day to no of weeks

Hi gurus,
I have a requirement, i need to caliculate the number of weeks as determined by the date period entered in the selection screen in the query.
Can any clarify me.
Thanks in advance.

Please search forums before posting
search this threads
Re: printing calender
and for info on usage of <b>Day_get_week</b> refer this thread:
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/help-on-function-day_get_week-1067350

Similar Messages

  • How can I see more than 6 all day events in the week view without scrolling?

    How can I see more than 6 all day events in the week view without scrolling?  I need to see all of my all day events at once.  I use this for scheduling and comparing of # invoices.  Going back and forth to scroll is cumbersome.  I just want to be able to expand the top section so I can see everything at once.

    Any ideas, anyone?

  • Creating a fiscal date table that includes Day of Year and Week of Year column

    Hi,
    Our fiscal year runs between 1st October through to 30th September and I'm trying to create a date table that I can use to represent this in Powerpivot (I'm using Excel 2013). I had no probably creating columns for Fiscal month or fiscal year, however I am
    having issue breaking it down more than that, specifically I cannot work out how to calculate:
    - day of the year
    - week of the year (with week one starting on the first day of the year rather than the first Monday)
    I worked out how to do the day of the year until I had to try and account for leap years which broke the formula I had! Can anyone please recommend solutions, I cannot see anything online about this. Obviously I know that it is simple to do this for a normal
    calendar year but this approach doesn't work with a custom fiscal year.
    Whilst it is useful for several reasons, my main reason for wanting week is so that I can plot my Pivotcharts more smoothly (although I may have missed an easier way to do that).
    Thanks,
    James

    For my example I started with 1 column in Power Pivot called [Date]
    I created the following Columns
    [DayofMonth] =Day([Date])
    [MonthNumber] =Month([Date])
    [Fiscal Year] =IF([MonthNumber]< 10, Year([Date]), (Year([Date])+1))
    [Fiscal Day] =[Date] - DATE(([Fiscal Year] -1), 10,1) +1
    [Fiscal Week] =RoundUp([Fiscal Day] / 7, 0)
    Change [Date] to whatever your date column is and those DAX formulas will get you what you need

  • Entire days of pictures are not loaded on iCloud, while most of the days are loaded. Weeks has passed, while I was connected to wireless, so I dont understand why still emtire days are missing...

    Entire days of pictures are not loaded on iCloud, while most of the days are loaded. Weeks has passed, while I was connected to wireless, so I dont understand why still entire days are missing...

    I noticed an entire series of its always sunny in philadelphia is missing from my apple tv "purchased" section where i can stream it directly from itunes...I just purchased the new season and not showing at all

  • Getting the Last day for a given week number

    Dear Gurus,
    I want to find the Last day of a given week number.
    Can anyone help me out.
    Regards
    Madhu K

    Here I dont want to pass date,
    If I give Week Number, Can I get that Week Numbers
    Last date and First Date.
    test@ORA10G>
    test@ORA10G> -- this query fetches the start and end dates for a specified week in the current year
    test@ORA10G>
    test@ORA10G> select
      2    wk as week,
      3    min(dt) as start_date,
      4    max(dt) as end_date
      5  from (
      6    select
      7      trunc(sysdate,'yyyy')+level-1 as dt,
      8      to_char(trunc(sysdate,'yyyy')+level-1,'ww') as wk
      9    from dual
    10    connect by level <= trunc(add_months(sysdate,12),'yyyy') - trunc(sysdate,'yyyy')
    11  )
    12  where wk = &week_number
    13  group by wk;
    Enter value for week_number: 1
    WE START_DAT END_DATE
    01 01-JAN-08 07-JAN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 23
    WE START_DAT END_DATE
    23 03-JUN-08 09-JUN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 52
    WE START_DAT END_DATE
    52 23-DEC-08 29-DEC-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 53
    WE START_DAT END_DATE
    53 30-DEC-08 31-DEC-08
    test@ORA10G>
    test@ORA10G>pratz
    can be shortened further:
    test@ORA10G>
    test@ORA10G> select
      2    to_char(trunc(sysdate,'yyyy')+level-1,'ww') as wk,
      3    min(trunc(sysdate,'yyyy')+level-1) as start_dt,
      4    max(trunc(sysdate,'yyyy')+level-1) as end_dt
      5  from dual
      6  where to_number(to_char(trunc(sysdate,'yyyy')+level-1,'ww')) = &week_number
      7  connect by level <= trunc(add_months(sysdate,12),'yyyy') - trunc(sysdate,'yyyy')
      8  group by to_char(trunc(sysdate,'yyyy')+level-1,'ww')
      9  /
    Enter value for week_number: 1
    WK START_DT  END_DT
    01 01-JAN-08 07-JAN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 53
    WK START_DT  END_DT
    53 30-DEC-08 31-DEC-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 23
    WK START_DT  END_DT
    23 03-JUN-08 09-JUN-08
    test@ORA10G>
    test@ORA10G> /
    Enter value for week_number: 14
    WK START_DT  END_DT
    14 01-APR-08 07-APR-08
    test@ORA10G>
    test@ORA10G>Message was edited by:
    pratz

  • How to Find difference of cal day Period

    Hi Friends,
    How to get difference of cal day in period.
    example is 01/01/2008 - 31/01/2008 = Number of dates
    This query is in inventory to calulate average of issues and receipts in the particulat period.
    Please help me any one.
    Thanks and regards,

    HI,
    Create two replacement typr formula variables for this two characterictics dates , keep in mind while creating the repl path variable assign currency/unit as date.
    Then just calculate the difference using a formula .. U can use DATE function (in the data function) in the formula though it should work without DATE function.
    Hope it helps,
    Assign pts if helpful..

  • Start day for global agenda week view

    Does anyone know if there is a way to change the first day of the week for the global agenda week view? For example, instead of having the week start on Monday, it starts on Sunday.

    Hi Christopher,
    The WEEKDAY function allows specifying either Sunday or Monday as the first day of the week:
    WEEKDAY
    The WEEKDAY function returns a number that is the day of the week for a given date. WEEKDAY(date, first-day)
      date:  The date the function should use. date is a date/time value. The time portion is ignored by this function.
      first-day: An optional value that specifies how days are numbered.
    Sunday is 1 (1 or omitted):  Sunday is the first day (day 1) of the week and Saturday is day 7.
    Monday is 1 (2):  Monday is the first day (day 1) of the week and Sunday is day 7. Monday is 0 (3):  Monday is the first day (day 0) of the week and Sunday is day 6.
    But I think you are referring to the first day of the 'workweek', for which I do not see a means of defining a custom value.
    Since you want to 'insert categories', though, you could easily define your own, using WEEKDAY(date) or WEEKDAY(date,1), plus an IF statement to return the category label appropriate to the day. Here's one for a Sunday to Thursday work week. Dates are in column A, the formula is in whichever column you want as the Category column. For the example, I've placed it in column B.
    B2, and filled down: =IF(WEEKDAY(A)<6,"Work","Off")
    The top table shows the weekday numbers returned for each day of the week for each of the three permitted values for the optional second argument. The bottom table shows the results from the formula above, used to define a category label for each date:
    A10 was left blank intentionally, to determine if the lack of data resulted in an error. The Warning message, flagged by the blue 'warning' triangle, is "The formula uses a number in place of a date." The 'date' assigned to this numerical value of zero was a Friday, but I'm not certain when. Probably best to avoid extra rows with no date shown.
    Regards,
    Barry

  • Cal day Average..

    Dear Gurus,
    Iam having a problem with the cal day average my scenario is as follows:
    Iam executing a report based on the Cal day where for ex:01.01.2010 - 10.02.2010 iam gettin the data which contains aggregated data for the above selection criteria thats ok with me, But i need to add another column where i can get the Cal day average since in the selection criteria i have selcted for 40 days i want the total aggreated value/40 as my average per day.
    Can anyone help me in finding a solution.
    Regards
    Amar.

    Hi,
    To find day difference using function module refer below thread,
    what is the function module to difference between two date
       Using customer exit, find the days variance (var1) between ex.,01.01.2010 - 10.02.2010.
    Use this var1 for calculating average value. I mean total aggregated  value / var1.

  • I cal day and end hours in week view

    I just installed Tiger and am having trouble getting the hours that I want (7 a.m. to 8 p.m.) to only show in my week view. I followed the iCal help and set it up under preferences, yet is shows the day starting and ending at midnight. Help?

    Mark, welcome to the discussions. This feature of iCal is misleading - and not particularly useful. No matter what you set in the preferences there will still be 24 hours in the day, and all will be visible (though you can control how many are simultaneously displayed. Your 7am to 8pm setting controls which part of the display iCal lightly shade, and which part it leaves unshaded.

  • Multiple All Day Events Missing in Week View

    Hello,
    I just got my first BB a Curve 8900 and am very impressed.
    The only thing I don't like is that if I have more than one all day event on a particular day, in Week View I can't see them.
    (I've used a variety of other phones/PDAs over the years and this is not normally an issue)
    I've googled this and haven't found much relating to it, other than people not seeing all day events on the home screen or something.
    Is this a BB 'feature'? Is there a work around?
    I'd like to be able to see my week ahead at a glance and don't seem to be able to.
    Thanks in advance. 

    Hello RobertBL,
    I have the same problem. In week view i only see 1 event on days with multiple day events. I use firmware version 4.6.1.152 (platform 4.2.0.91). My Curve 8900 is T-Mobile branded (Netherlands). Until now i haven't found a work around. In other calendars (pocket informant and Agendus) i don't have this problem in weekview, so it must be a BB firmware bug.
    Greatings
    Message Edited by maccloud on 05-06-2009 09:50 PM

  • No days or dates in weekly view

    Just recently my iCal in weekly view hasn't shown the days of the week and the dates either. I have gone thru everything in the prefs and the menus and cannot find anything to bring them back.

    It appears that that is a change in '11
    LN

  • Have timesheet data. Trying to get staff at risk of burn out (worked 8hrs a day during last 3 weeks)

    Hi all,
    I've been trying to get a semi-complex measure out for over a day now but seem to be going round in circles. Most frustrating is I don't quite understand why one version throws an error, another throws out the wrong number and then whatever you guys come
    up with will give me the correct answer!
    I have a workbook uploaded here which I used for a different question, but majority of the data model is the same :
    https://onedrive.live.com/?cid=1C0322C61F94C9E9&id=1C0322C61F94C9E9%21125
    What I'm trying to do is find staff members that are at risk of burn out (eg consistently working > 8hrs a day)
    My main timesheet table (Time) is as such:
    StaffID (fk to staff table)
    ClientID (fk to client table)
    TaskID (fk to task table)
    TimesheetDate (fk to date table)
    EffortInHrs
    my date dim is standard fare, only thing i've added is an EndOfWeekDate (eg EOWDate. sunday is the last day therefore for each date for this week the endofweekdate column = 18-jan. For last week it was 11-Jan etc) and I also have a 'last freshed date' that
    shows the last time the model was refreshed
    A staff member can only record time against a specific task once per day, but they can have multiple tasks across multiple clients for one day
    The business rule im working with is
    if they've worked more than 8hrs at least once in the last 3 weeks (dates that fall between EOWdate for 'now' minus 3 weeks and EOWdate for 'now' ), then return the sum of EffortInHrs for all clients for every day in the last 3 weeks
    I've given up in getting it in one go so i'm trying to cobble together a number of calc columns and measures to get me closer.. but it all seems to stall
    eg the following calc column (DailySumOfHrs)
    =
    CALCULATE (
    SUM ( [EffortInHours] ),
    FILTER (
    ALLEXCEPT ( TIME, 'Time'[TimesheetDate], TIME[StaffID] ),
    DATESBETWEEN (
    'Date'[Date],
    'time'[TimesheetDate],
    'Time'[TimesheetDate]
    gives me the sum of effort in hrs for the day for each staff member. I couldn't get a measure version of this working. It would either aggregate across all days/staff or give context errors.
    So when I tried to take it to the next step to find the max using the same formula
    =
    CALCULATE (
    SUM ( [EffortInHours] ),
    FILTER (
    ALLEXCEPT ( TIME, 'Time'[TimesheetDate], TIME[StaffID] ),
    DATESBETWEEN (
    'Date'[Date],
    'time'[TimesheetDate],
    'Time'[TimesheetDate]
    I get errors, i'm guessing because i'm mixing my fact and date tables now and it doesn't know it can use the TimeSheetDate 'context' to filter.
    To get the 'last 3 weeks' filter working I added the following to the date dim
    =if([EndOfWeek]<[RefreshDateLocal] +7 && [EndOfWeek] > [RefreshDateLocal] -14,1,0)
    i then used it in an intermediate measure to get the max at the weekly grain
    WeeklyMax :=
    IF (
    MAX ( 'Date'[Last3WeeksFilter] ) = 1,
    CALCULATE (
    MAX ( TIME[DailySumOfHrs] ),
    FILTER (
    ALL ( 'Date'[date] ),
    MAX ( 'Date'[EndOfWeek] ) = MAX ( 'Date'[EndOfWeek] )
    'Date'[Last3WeeksFilter] = 1
    BLANK ()
    and finally the measure itself
    BurntOutHrs:=if([WeeklyMax]>8,SUM([EffortInHours]),blank())
    I am not happy with this at all. There are so many conditions (eg filters added) that need to be satisfied for this to return a sensible result and I need to expose a number of the 'backend' filters that users would need to add to the report to get the correct
    answer.
    As is, it only works for a simple Staff, date, burntouthrs report. If users attempt to create their own pivot table/chart and try to break it down by client or task it doesn't look right at all. I'd also like to be able to count how much stuff are working
    long hrs but this approach wouldn't support that at all.
    I could probably post dozens of my attempted dax that to me logically look like it should work but either aggregate wrong or throw context errors. Unfortunately my current approach to dax still is to try various, almost random variations until one works
    for whatever reason
    I always aim to have a measure that 'just works' in all contexts where it makes logical sense. For me to get that happening here i'd probably need to spend another few hrs trying all kinds of allexcept() conditions for each filter where i want it to work
    and hope none contradict each other
    Thinking about it now, this isn't really a separate measure at all.. i think a better approach would be to add a calc column to the staff table that checks if that staff member has >8hrs assigned for any day (i dont think the default time->staff relationship
    would allow this though). But i'm still interested on how to accomplish it using the separate 'measure' approach
    I'll go spend the rest of today trying to get the flag working in the staff dim!
    Thanks!
    Jakub @ Adelaide, Australia Blog

    Jakubk, is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Calendar day and Calendar Year/Week  mapping

    Dear SDN,
    I am unable to view Calendar Year/Week and Calendar Day ...Data..
    I have observed that they have not mapped in the Update rules of 0SD_C03 InfoCube...
    I have checked all the InfoSources (2LIS_11_VAHDR, 2LIS_11_VAITM, 2LIS_11_V_ITM, 2LIS_12_VCHDR, 2LIS_12_VCITM, 2LIS_13_VDHDR, 2LIS_13_VDITM)...
    There in all the Update Rules...
    Update Rules -- Details -- Time Ref.---
    Time Characteristic of Fiscal Year Variant is mapped with Source fields of Fiscal Year variant
    similarly,
    Calendar Year/Month is mapped with Update Date Statistics
    But Calendar Year/Week and Calendar Day are Blanck...
    I am thinking they also should be mapped..
    Please suggest me how to resolve this...
    Help will be greatly appreciated with points..
    Thanks in advance..
    This is very urgent...

    Thanks...
    But i have already assigned my self...
    0calyear/week to Update date statistics...
    and
    0calendarday to Update date statistics..
    I have assigned points to you...
    Thanks for your informatioon

  • Expand "all day" pane size in week view

    In Mountian Lion's Calendar, the week view shows the all day events in a narrow pane aong the top of the calendar window. However this pane is fixed and can't be resized to show more than 3 all day events. Does anyone have any tips or suggestions on how to change the size of this area?

    Hello RobertBL,
    I have the same problem. In week view i only see 1 event on days with multiple day events. I use firmware version 4.6.1.152 (platform 4.2.0.91). My Curve 8900 is T-Mobile branded (Netherlands). Until now i haven't found a work around. In other calendars (pocket informant and Agendus) i don't have this problem in weekview, so it must be a BB firmware bug.
    Greatings
    Message Edited by maccloud on 05-06-2009 09:50 PM

  • Current date, first day of month, last day of month, current week, current

    Hi All,
    may be the question will sounds basic for your guys, I am connecting via MDX a cognos reportnet on a BW 3.0B..due to loads of limitations on filtering via MDX on 'business date/time functions' , I would need to create in the infoqueries that are my data sources, the following additionnal objects:
    - current date
    - first day of current month
    - last day of current month
    - current week
    - current year
    I do not want prefiltered infoqueiries but object with these single values so that from reportnet I can have something like: OCALDAY between 'first day of current month' and 'last day of curent month'
    Is there standard fonction for this under BW/BEX or if we need to developp functions has nayone some code examples.
    thanks a lot for your great input
    David

    Hi,
    In universe level if you want implement the requirede functions then you have to write custom sql and if you want to implement them in Reporting level then most of the functions are available to you. e.g. Quarter,Month, Year, Current Date....
    Cheers,
    Suresh A.

Maybe you are looking for

  • Error while Generating PDF file from Datagridview .

    Hi every one,      I'm trying to generate pdf file from datagridview,while executing my code getting nullvalue exception.. Here is my code: private void btnexportPDF_Click(object sender, EventArgs e)             //Creating iTextSharp Table from the D

  • Can't Boot after crash, even in safe mode!

    My Mac froze while idle with Lightroom open. It may have hung while remotely copying something off an external hard drive. But now it won't boot even in safe mode with all USB peripherals detached (including the hard drive that I might have been copy

  • How to attach a document (resume) when replying to a job posting?

    I am on Craigslist trying to respond to a job posting by clicking the Reply button & my email (gmail) opens a new message window properly but I can't attach my resume to the email which is what I need to do in order to respond to the posting.  In the

  • Organization structure in OM

    Good afternoon to all This is in te module OM I need your help. I want to know ........wich is the table where is the data of the organization structure of the transaction ppose? Thanks

  • Logic Pro 9 Crashing

    Hello, I just recently have been dealing with my Logic Pro 9 Crashing. I am not exactly sure when the issue started but i am strongly thinking something with updates. I currently run Mac OS X 10.8.5 on a 2.2Ghz Intel Core 2 Duo processor, 4GB of RAM.