Skip to Content
avatar image
Former Member

Macro Help

Hi All,

I need help in our Macro Logic.

We running a Macro which should basically delete the volumes of Sales Forecast in Current Months one specific Bucket.

We are using Gregorian Calendar in which one our data view has Buckets with respect to Split Weeks where a week constitute some days in current month and next months days.

Our current logic is to delete the data in Sales Forecast which is available in Split Week of Current Month if my current week is a Split Week of current Month.

I was able to get write the logic to check whether the current iteration selection is Current month but I am facing problem determining the Split Week of Current Month. We separate the Split Week by A and B. Example Week 31 is a Split Week, so this get separated by WK 31 A July Dates and WK 31 B August Days.

I wrote a logic to check whether current iteration is Split Week. Logic looks like below snapshot:

What I am trying to check here is that, Current Iteration Sale Forecast Begin Date of Bucket I am getting and checking the WEEKDAY it falls in and similar for End Date of Bucket. If its Split Week B then it cant have Weekday as 1 and it should weekday as 7 on end date of the Bucket for Split Week B. If these condition satisfy then delete the Sales Forecast of the current week. I tried the above logic in one If Condition with AND operator but I am unable to yield the results.

Could anyone help me with respect to any other logic to check whether selected iteration is a Split week of B Type? Kindly correct if my above logic is wrong and could some provide proper way to retrieve the above logic.

Hope these details are enough. Kindly revert back if you have any question or need more information.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 11, 2013 at 09:06 AM

    Hello Bhaskar, Not sure whether my understanding is correct, but  I think only checking "bucket start date <> Monday" is enough to judge whether a bucket is a split week B type ... no need to judge the bucket end date ... And similarly, "bucket end date <> Sunday" is a criterion to judge split week A type ...

    Add comment
    10|10000 characters needed characters exceeded