• Lidou123 (11/27/2012)


    Hello,

    I have a script problem.

    I calculate data per week (group by week)

    However, for indicators, I have business rules which apply in the month.

    Here is the problem because I have weeks that are mounted on 2 different months.

    I 'd like so:

    1 - Identify the weeks that straddle two months

    2 - For the week, identify the last day of the month is the day of the week.

    3 - If the date is before Wednesday when the week belongs to month

    Otherwise, the week belongs to the next month.

    I hope I have clearly expressed my need.

    And sorry for my English.:))

    Hi, Lidou123,

    What day of the week is the first day of the week for you?

    Also, how do you want the weeks numbered? From the start of the year or the start of the month?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)