Formula to Calculate the Representative Week (number) for each Date

Farangiz
edited July 25 in Modeling

I need to calculate which date each week represents, I have a Weeks Attribute Module. I have tried some formulas but they did not work. I would really appreciate if someone could give me some advice or a direction.😊

Best Answers

  • Farangiz
    Answer ✓

    seymatas1 Thank you for your response, but unfortunately I am not using weekly calendar.

  • derektslim
    edited July 25 Answer ✓

    I would be assuming you had created a list that had the weeks and years in it, similar to the Weeks under time dimension.

    You should be able to achieve the results with the following line items:

    1. ITEM » ITEM(Custom List)
    2. NAME ITEM » NAME(ITEM)
    3. Week No. » Formula to derive week number in Number format
    4. Year » Formula to derive year in Number format
    5. Date List » DATE(Year, 1, 1) + 'Week No.' * 7 in Date Format
    6. Date Start
    7. Date End

    How my custom week list looks:

    Formula behind it:

    You can derive a start and end date, and then point your dates back to between this range to derive your custom week.

    Hope it helps in the right direction!

    Best regards,

    Derek

Answers

  • seymatas1
    edited July 25

    Model calendar has an option to show week start or end dates. You can utilize it if you are using weekly calendar.