Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    Nuernberg, Germany
    Posts
    36

    Unanswered: Budget months to weeks

    Hi,

    my customer asked me to devide his monthly budget
    (imported from excel into SQL server 2005) "by 4" to
    get weekly budget-measures.
    I told him that this isn't quite that easy :-)

    Now I'm wondering if there is anybody out there
    who already solved that issue.
    Taking data like

    01.01.2009 | customer (or some dimension) | budgetquantity
    01.02.2009 | customer (or some dimension) | budgetquantity
    01.03.2009 | customer (or some dimension) | budgetquantity
    and so on..
    convert it to
    04.01.2009 (week 1) | dimension | budgetquantity(januar) / 4
    11.01.2009 (week 2) | dimension | budgetquantity(januar) / 4
    and so on..
    So the 12 monthly records will split up to 52 weekly records.

    I know that it could not be this easy but perhaps somebody
    developed a procedure?

    Thanks for any ideas about that.

    best wishes for the upcoming days.

    Mike

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    why can't you split the yearly budget into 52 chunks? So you are one day off. What's the big dealie?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by Michael Kaiser View Post

    my customer asked me to devide his monthly budget
    (imported from excel into SQL server 2005) "by 4" to
    get weekly budget-measures.
    I told him that this isn't quite that easy :-)
    It should be easy, as long as your customer tells you what to do with weeks that begin in one month and end in another. To what monthly budget do they belong?
    ---
    "It does not work" is not a valid problem statement.

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,420
    Provided Answers: 7
    http://www.dbforums.com/microsoft-sq...tion-help.html
    If you put this function into the SQL you be able to group the data by weekend (sat date) then Sum the values to that
    I use I a number of ways
    its great for weekend monthend sum u get a full week of data in the sum
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •