Quarter to week convert

hi,
Could you please suggest some Function Modules that convert data from Quarterly basis to weekly basis

Hi,
There is no standard function for this. Infact Quarter to Week conversion is strange requirement.
As one quarter can have different week numbers, there is no logic how to determine exactly the required week number.
Regards
SSS

Similar Messages

  • Advanced Custom Field help. Need fiscal quarter/fiscal week.

    A coworker is setting up an MS Project...project, and she asked
    for some help adding a custom field that would convert the Start date field into our Fiscal Quarter Fiscal Week schema, to display as FQFW, e.g. Q1W1. I've written a formula that accomplishes this quite nicely in excel, but I've never even touched Project
    until this week. Apparently it doesn't take formulas quite the same way as Excel does. I tried using the ''Switch" function in Project, and it worked, but it only accepts 14 arguments(right?), and there are obviously 52 weeks we're dealing with. Does
    anyone have any suggestions? Would there be a way to do this using VBA? (I know next to nothing here as well.)
    Formula in excel where A1 is the Start Date:
    =IF(AND(A1>=DATE(2014,2,1),A1<=DATE(2014,5,2)),CONCATENATE("Q1","W",(INT((A1-DATE(2014,2,1))/7)+1)),IF(AND(A1>=DATE(2014,5,3),A1<=DATE(2014,8,1)),CONCATENATE("Q2","W",(INT((A1-DATE(2014,5,3))/7)+1)),IF(AND(A1>=DATE(2014,8,2),A1<=DATE(2014,10,31)),CONCATENATE("Q3","W",(INT((A1-DATE(2014,8,2))/7)+1)),IF(AND(A1>=DATE(2014,11,1),A1<=DATE(2015,1,30)),CONCATENATE("Q4","W",(INT((A1-DATE(2014,11,1))/7)+1)),FALSE))))
    Any and all suggestions welcome.
    Thanks.

    msinnen,
    You're correct, switch statements and if statements can only be nested to 15 levels. However, VBA can get you there. This macro should do what your coworker needs with the following assumptions - the fiscal year starts in January and quarters end on the
    last day of the month, not the last Friday. If either or both of those assumptions are incorrect, then this macro will need some tweaking. Note: the quarter and work week designator will be written into the Text1 field.
    Sub FQuartsandWeeks90()
    Dim t As Task
    Dim Mon As Integer
    Dim Qtr As String, Wk As String
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            t.Text1 = ""
            Mon = Month(t.Start)
            Select Case Mon
                Case 1 To 3
                    Qtr = "Q1"
                    Wk = "W" & CStr(DatePart("ww", t.Start))
                Case 4 To 6
                    Qtr = "Q2"
                    Wk = "W" & CStr(DatePart("ww", t.Start) - 13)
                Case 7 To 9
                    Qtr = "Q3"
                    Wk = "W" & CStr(DatePart("ww", t.Start) - 26)
                Case Else
                    Qtr = "Q4"
                    Wk = "W" & CStr(DatePart("ww", t.Start) - 39)
            End Select
            t.Text1 = Qtr & Wk
        End If
    Next t
    End Sub
    John

  • How to get current fiscal year/quarter/month/week

    Post Author: [email protected]
    CA Forum: Semantic Layer and Data Connectivity
    Hi friends,
    I have to calculate
    1. current year/quarter/month/week.
    2.Previous year/quarter/month/week.
    please tell the process to achieve the above scenerio's.
    the structure of the fiscal_cal is as  follows.
    Name                                      Null?    Type
    TODAY                                     NOT NULL DATE
    FISCAL_DAY                                         NUMBER(8)
    FISCAL_WEEK                                        NUMBER(6)
    FISCAL_MONTH                                       NUMBER(6)
    FISCAL_QTR                                         CHAR(18)
    FISCAL_YEAR                                        NUMBER(4)
    FISCAL_MONTH_WORK_DAYS                             NUMBER(2)
    sample week data is as follows
    FISCAL_WEEK
         200752
         200753
         209901
    Thanks.

    based on ur target database DBMS you can find a built-in functions be used in the universe designer to get the requirment you talked about, like in oracle
    to_char(mydate,'yyyy') it will return the year in the yyyy format.
    and the same way for the other things you want
    to_char(mydate,'q') return the quarter.
    w return the week of the month
    ww return the week of the year
    mm return the month
    ,, to get the last year
    you can use also a builtin functions
    like add_months(mydate,-12) that return the same date for the last year, and you can do the same operations as before.
    its all related to the DBMS.
    good luck

  • Quarter Vs week data difference

    Hi,
    I am running two reports:
    1st report - It is based on the 2nd Quarter of the year.
                     means it is restricted by using 2nd quarter.
    2nd report - It is same as 1st report, except that it is based on the 12 weeks which constitute that qtr.
    so therotically the output of both the reports should be same.
    because the selection criteron of both is same
    But the output of the reports are different ...
    Howz it possible..please help me out..its quite urgent....

    Himashu,
                  Are the both queries based on the same infoprovider, if they are the best way to check is pull the 0calweek into your 1st query free characteristic and run the report for the 2nd quarter and drill it down by the 0calweek in rows, compare this report with your 2nd report, check for the global filters and restrictions in two reports, check whether they are same or different.
    *assign points if helpful**
    Peter R

  • Days to week convert

    hello all,
    i want to convert days into weeks. can any of u please suggest function module to convert form days to weeks.

    Hi liyakath ali 
    Just go to the Formula in the update rules and use DATE to WEEk thats it..
    Hope itz clear a little atleast...!
    Thanks & Regards
    R M K
    ***Assigning pointz is the only way of saying thanx in SDN ***
    **Learning the thingz is never end process if u stop it will Be a devil if u continue it will be a divine***
    > hello all,
    > i want to convert days into weeks. can any of u
    > please suggest function module to convert form days
    > to weeks.

  • How to derive  Current week and Number of Weeks for present quarter.

    Hi,
    Currently we are developing a report on Actuals and Planned sales. We have two different data targets to hold these information.
    CRM team will provide targets for BP monthly in CRM table, from where we are extracting the data into BW and report exection frequency is Daily.
    Report Output format:-
    1)  Target1St Month in the quarter,   Target2nd Month in the quarter, Target3rd Month in the quarter, Target Quarter,  Month To date (Taget for Current month - Sales till today),
    Let us assume we are Q1 and user executing this report on end of March Target1 = Jan, Target2 = Feb, Target 3 = March and Quarter target = Target1 + Target2 + Target 3.
    We can achieve this by offset variables.
    But if users are exectuing this report Apr (Q2) then Target1 = Apr target , target2 and target3 =0
    Becoz we are in Q2 and first month of the quarter. If users are executing this report in May target1 should be Apr target and Target 2 = May target and Target3rd month should be Zero.
    2) We have one keyfigure called as Quarter Phased Target = (Quarter target/ No of weeks in current quarter)* current week; For this we have to get No of weeks in every quarter and Curren week (when the reports get executed).
    Let us assume we are executing this report on 25th jan and target for that month = 122units then Quarter phased target =  [(122 + 0 (For Feb)+ 0 (For Mar) )/ 13] X4
    4 is becoz we are in 4th in that quarter,
    13 is becoz no of weeks in that quarter.
    0 (For Feb) - Becoz we are in Jan only..
    Hence please let me know how to get No of weeks in Current quarter and Current week for every quarter..
    All the helpful answers will be awarded with full points.
    Regards,
    suresh

    hi,
    For the first querry.
    the problem is because u are using calmonth.
    Instead of using cal month use fiscal period.
    When u use fiscal period the data will be shown automatically for the Previous months using offsets.
    u have to take taht in ur transformation and should map it to constant value depending on the fiscal periods of ur compnay?
    march- apr,jan-dec etc.
    for teh second querry there would be some charecteristic which might give data in weeks as well just check that and if availabe u can use it.
    am not too sure abt it.

  • Complete Weeks of current Quarter ..

    Hello,
    we have a time table (exp.: D_TIME) listing every day between 1.1.2006 to 1.1.2017
    and i am triying to filter with following criteria ..
    Complete Weeks of the current Quarter (Only weeks wich are from Monday to Sonday included in the current quarter)
    AND < SYSDATE
    The borders of this Filter are correct but in some days teh result is empty ..
    +
    SELECT * D_TIME
    WHERE
    D_TIME.DATE_X BETWEEN NEXT_DAY(TRUNC(TRUNC(trunc(SYSDATE), 'iw'),'Q')-1,'Monday')
    AND TRUNC(trunc(SYSDATE),'iw')-1
    +
    ANY Suggestions .. ? Thanks ..

    Hi,
    To find all the days between the first Monday in this quarter, and the last Sunday before today, inclusive:
    SELECT  *
    FROM     d_time
    WHERE     date_x    BETWEEN TRUNC ( TRUNC (SYSDATE, 'Q') + 6
                           , 'IW'
                AND       TRUNC (SYSDATE, 'IW') - 1
    ;This assumes that d_time.date_x is always midnight (00:00:00).
    When you TRUNCate a date to some longer time division (such as a quarter),that implies TRUNCating to all smaller divisons that are contained in it, so
    TRUNC (d, 'IW') truncates the hours, minutes and seconds; there's no need to say
    TRUNC (TRUNC (d), 'IW').
    NEXT_DAY is very handy, but it depends on NLS_DATE_LANGUAGE. TRUNC (d, 'IW') works the same regardless of your NLS settings.
    This may still retun 0 rows. For example, as of Sunday, October 9, 2001 there had not been a Monday-to-Sunday week that fell entirely in the current quarter. (The week starting on Monday, Octoeber 3 was not yet complete, by a fraction of a day.)
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • Convert CRMT_ALV_DATES_UI-DURATION to duration in months

    Hi Folks,
    Can you please help me in finding class/Function module which can be used to convert time duration from any unit type to months?
    This is with reference to the unit types maintain for date profiles.
    Value can be of following Unit types,
    Day
    Hour
    Minute
    Month
    Quarter
    Second
    Week
    Year
    This value has to be converted to value in months.
    Please let us know if you find such modules.
    Thanks and Regards,
    Amit

    Hi Amit,
    You can use this class CL_TIMEUNITCALC_MONTH to do month calaculation.
    Reward points if helpful.
    Regards
    Siddhartha Sengupta

  • How to allow users to pick up a specific week for a report based on SSAS Cube

    hi Folks: 
       I have created a report which is pretty simple: for a specific week, I want to know the total values.   This specific week comes from a Fiscal Calendar hierarchy ( Year - Quarter - Month - Week) .
     Now, I want to create a parameter called @specificWeek to this cube based report so that users could pick any week they want ( no multiple values allowed).   I understand that I need to create a parameter @specificWeek and created a dataset to
    populate .
    After that, find a way to embed this paramenter into the main MDX query .
     Can someone show me how to do this?  
    Below is the sample from cube Adventure Works, I want to make the Hierarchy Date.FisCal Weeks as the parameter,
    how to implement? thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    hi Ayad:
      I've done the following steps
    1. In shared datasets, drag all fields I need in and drag the data hierarchy into the filter and check it as a parameter. 
    2. On the reportData pane, when I right click the datasets, I did not see any option says show hidden dataset. 
    3. WHen I run the report, it did not pop up the dropdown list for the week selection.
    Any ideas? thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

  • Best method to determine the week number of a month - SQL Server 2012

    Hi,
    I'm searching the most valid and tested method to determine the week number respect to a month.
    Fe, the 1st January falls in the 1st week of January, the 1st February fall in the 1st week of February, and so on.
    I've found many solutions but I'd like to know possibly the best one.
    Thanks

    Hi Uri,
    SELECT DATEPART(week, '20150104')
         - DATEPART(week, CONVERT(CHAR(6), '20150104', 112)+'01')
         + 1
    returns 2 and not 1. It's a Sunday.
    Waiting to be spoonfed, eh?
    The one-off in my query would be very simple to figure out - I forgot to add the +1. Is too much to expect from you that you could figure it out yourself?
    And likewise, in my post I said that you should use "week" for weeks starting on Sunday, and "iso_week" if your week starts on Monday. Uri neglected to observe this, but you had the information to correct it. If you had been interested
    in doing some work yourself, that is.
    Nevertheless, there is an issue that I overlooked:
    DECLARE @day date = '20160105'
    SELECT datepart(iso_week, @day) -
           datepart(iso_week, convert(char(6), @day, 112) + '01') + 1
    This returns -51. This is because with ISO week numbering, Jan 1st falls into week 53 of the previous year, if it's on a Friday or later. Week 1 is always the week of Jan 4th. When you week this does not happen, as week 1 is always the week with Jan
    1st. (Dec 31st is always in week 53 or 54.)
    To correct for this, we need this query:
    SELECT DATEPART(iso_week, @day) -
           CASE WHEN DATEPART(iso_week, CONVERT(CHAR(6), @day, 112) + '01') < 50
                THEN DATEPART(iso_week, CONVERT(CHAR(6), @day, 112) + '01')
                ELSE 1
           END + 1
    Erland Sommarskog, SQL Server MVP, [email protected]

  • A PC convert in need of help

    Firstly I appologize if I am posting in the wrong forum. I am a recent (last week) convert to Mac. I am the proud owner of a new Macbook Pro running leopard 10.5.1. I had no problems setting the system up UNTIL I got to Expose' and Spaces. There is no Icon for either on the Dock. I set them up (I think) in system preferences but the do not seem to be working properly. There is a tiny icon in the menu bar for Spaces. In spaces I can toggle between windows but I can not display all windows at the same time. In Expose' I can clear all windows (F11) but when multiple windows are open the contrast in shading is not evident. Have I done something wrong??

    Hi Dezzaj, welcme here in the Forum.
    Maybe you should try this setup for Spaces and Expose:
    Spaces - Activate = Mouse Button 3 ( on Mighty Mouse)
    Expose - all Windows= F9 / or Mouse Button 4
    Expose - Applications Window = F10
    Expose - Desktop = F11
    Dashboard = F12
    Maybe that helps ...displaying all Spaces Windows....and having it organized...
    aah ya, you can set thse things in system preferences " Expose & Spaces"
    Message was edited by: Dirk

  • Does OBIEE 11.1.1.7 support AGO function at Week level

    Hi,
    I have a time dimension with Year,Quarter,Month,Week and Day Levels.
    Year - 2013,2012...
    Quarter- Q1,Q2,Q3,Q4
    Month - 1,2,3..12
    Week - 1,2,...52
    Day - Date_id (20130101...(YYYYMMDD).
    My Keys are : Year Level(Year_Number)
    Quarter Level (Year+Quarter Number)
    Month Level(Year+Month number)
    Week Level(Year+Week number)
    Day - Date_id(also defined as chronological keys)
    I am creating a AGO(Measure,Level,1) in answers for Year and Week Level and they don't render correct results.
    I started building the hierarchy with only Year and Day levels..verified the results - Looks Ok.
    Similar fashion proceeded with Year,Quarter,Month and Day - Looks OK.
    When I introduce Week level - All the AGO values are incorrect.
    Any help on this is really appreciated.
    Regards,
    Swetha

    Thanks Srini Veeravalli for your reply.
    Yes I have verified it thoroughly.I have implemented this before on 10G for other customers and I don't feel that something is wrong with it .
    I found this link on AGO Function in OBIEE 11G:
    =======================================
    https://forums.oracle.com/message/9323083
    Does a month have always the same number of week and begin with the first day of a week ?
    If it's not the case, your dimension is not good when you make a report on the week grain for a year ago for instance.
    Here a check list:
    http://gerardnico.com/wiki/dat/obiee/ago_todate_configuration#timecalender_dimension_design_verification
    ============================================
    OBIEE 10G/11G - How to set up the time dimension (for time series functions Ago, Todate, ...) ? | GerardNico.com …
    In the above post also, Time dimension configuration for AGO/TODate ( Time series) are set up with 4 levels: Year,Quarter,Month and Day.
    So Just needed a confirmation  if week level shouldn't be in the hierarchy in 11.1.1.7.
    Regards,
    Swetha

  • Converting Mov to FLV audio loss

    Hi all,
    This might be something someone could help me think. The problem I seem to be encountering is a loss of audio in the later quarter of videos converted into an flv from a quicktime mov (PAL 1024kbps / 29fps / 500x280), this typically happens on a file durration of upto 2 or 3mins. It doesnt happen when converting from a wmv, (also trying an AVI) although the outputed quality tends to be a lot less clearer using some of these other formats. Interestingly, when previewing the MOV in a quicktime player theres no signs that this will happen / no loss of audio / no blips in the frames around the later of the vid. Both the On2 VP6 or Sorrenson Spark cunjor the same fault.
    I would love to here someones take on this
    Many thanks
    Matt

    Welcome to the forums.
    (PAL 1024kbps / 29fps / 500x280)
    That's weird, PAL is 25fps 720x576.
    converted into an flv from a quicktime mov
    What did you use to convert? Perhaps try a different converter?
    Cheers
    Eddie

  • OLAP time dimension - how are the weeks allocated

    Could someone please help me understand what logic Oracle uses when one makes use of Oracles OLAP time dimension based on weeks.
    I am use Oracle OLAP 11.2
    I have a Time dimension that has the following hierarchy:-
    YEAR
    QUARTER
    MONTH
    WEEK
    For calculating the weeks ID I make use ISO week and year i.e. IYYYIW
    For calculating the end date I use the following:- NEXT_DAY( l_date, 'MON' ) -1
    i.e. the weeks end date is the Sunday.
    According to me this is the required result.
    Problem is that for some months there are 3 weeks allocated which makes no sense to me.
    I cannot understand the logic used in allocating the weeks.
    The following is an example:-
    the following weeks were allocated to the month February
    201306 (end date= 10-2-2013)
    201307 (end date= 17-2-2013)
    201308 (end date= 24-2-2013)
    but the following week was allocated to January which makes no sence to me,
    I would have expected it to be found in February
    201305 (end date= 3-2-2013)
    Week 201309 (end date= 3-3-2013) was allocated to March which according to me is correct..
    Another example is week *201030 (end date= 1-8-2010)* that is allocated to July while I would have expected that it should be August.
    I would have thought that it uses the end date that is placed in the mapping to determine the month to place it in.
    Could some one please explain what the reason for this could be.

    Oracle OLAP model/design (in this case, at least) cannot compensate to coverup existing flaws in the relational model/design.
    I dont think this is a valid hierarchy even considering relational model/design.
    Weeks do not fit in below Months (calendar months).
    You can force fit them by making Weeks the source of truth and making all Months logical Months like "Business Month", "Business Quarter", "Business Year" etc. which will be composed of whole weeks but differ significantly from the calendar definition of Month, Quarter, Year etc.
    You are better off modeling time as composed of two hierarchies:
    H1: DAY -> MONTH -> QUARTER -> YEAR and
    H2: DAY -> WEEK
    Alternately if you dont want to introduce DAY level (lower granularity), you can split up the Time dimension into 2 different dimensions. And also modify your star schema to add an additional time dimension key to fact table - one key pointing to WEEK and another pointing to MONTH (independently).
    TIME_MO: MONTH -> QUARTER -> YEAR
    TIME_WK: WEEK
    The fact data will need to be split up to correctly identify the coirrect MONTH-WEEK combination for the relational record.
    E.g:
    Fact table should have 2 dimension Fks for WK_KEY as well as MO_KEY so that a fact figure of 1000 evaluated over 7 days is split up into 300 from 29-31st of previous month and attached to MO_KEY of previous month and another record of 700 covering days from 1-4 and recorded/tied to same WK_KEY but next month (next month's MO_KEY).
    HTH
    Shankar

  • Count of Weeks where a certain measure is 0

    Hi,
    I'm trying to create a calculated measure which would give me count of weeks where a certain measure say Sales is greater than 0. I have a hierarchy YEAR->QUARTER->MONTH->WEEK in time dimension DIMTIME. And I have used the expression COUNT(MYCUBE_ONHANDASSETS GT 0) to get the count. But this expression gets count of weeks from all the years instead of selected time periods. Lets say I have the measure MYCUBE_SALES greater than 0 at 2 weeks in Jan 2010, then the count should be 2 at level Jan 2010 in the hierarchy. But it shows 50 which is total weeks in year 2010 where MYCUBE_SALES is greater than 0.
    Can anyone help me solving the issue ?
    Thanks,
    RK

    You should be able to copy the data from your MYDWCUBE_AVG cube to COUNT_CUBE using OLAP DML.
    First limit the dimensions to the appropriate leaf values, then assign. The ACROSS clause should list the partition template (if MYDWCUBE_AVG is partitioned) or the composite if it is not. I am approximating below.
    LIMIT TIME TO TIME_LEVELREL 'MONTH'
    LIMIT PRODUCT TO PRODUCT_LEVELREL 'SKU'
    ...other leaf level conditions
    LIMIT COUNT_CUBE_MEASURE_DIM TO 'ONHANDASSETSCOUNT'
    LIMIT MYDWCUBE_AVG_MEASURE_DIM TO 'ONHANDASSETS'
    COUNT_CUBE_STORED = MYDWCUBE_AVG_STORED ACROSS MYDWCUBE_AVG_PRT_TEMPLATEIf you are in 11.2.0.2 then you can also use DBMS_CUBE to copy the data without needing to worry about the physical object details.
    begin DBMS_CUBE.BUILD(q'! COUNT_CUBE USING
         FOR
            "TIME" LEVELS ("TIME"."MONTH"),
            "PRODUCT" LEVELS ("PRODUCT"."SKU"),
             ... other leaf level conditions ...
         BUILD
           SET COUNT_CUBE.OnHandAssetsCount = MYDWCUBE_AVG.OnHandAssets
    end;
    /

Maybe you are looking for

  • Start of cycle date is not taking while scheduling

    Hi I have created a maintainance plan with scheduling indicator TIME and scheduling period 365 days . I am giving start of cycle date as 04-02-2011 but while scheduling the plan it is taking 19-02-2011 as first plan date . my maintainance plan cycle

  • Helix 3701cto Windows 8.1 freezing

    Hi, I bought a Helix 3701cto about a year ago. It came with Windows 8, which had some issues but somehow worked. When the update to 8.1 came I reinstalled to have a clean system. With the small 128Gb ssd I absolutely needed the space. While working a

  • Safari without flash works on iPad but not on mac

    I decided to remove flash from my mac, because I have found that a lack of flash really wasnt causing me any major problems on my ipad. However, when I access some sites, like this one.....  http://www.dailyfrail.com  on my ipad the embedded video wo

  • How to design universe to dynamically/conditionally hide sensitive data

    Hi, I am completely new to the BusinessObjects suite and am trying to understand which features might help me solve a problem. In K-12 education, there is often a desire to allow users to drill into and filter data in various ways, but at the same ti

  • Plz help in tuning this query......

    SELECT "LAN","VEF_REF_NO","VF_TYPE_CODE","APPLICANT_TYPE","MANDATORY","OPTIONAL","COMPLETE","DT_COMPLETED","REFIRENO","ROLE","USER_ID","DT_LASTUPDATED","TEMPLATEFIRED" FROM T_VER_STRATEGY_DETAILS M WHERE VF_TYPE_CODE =1 AND APPLICANT_TYPE ='A' AND DT