• DanP
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Working on a formula to ultimately get the week number of the quarter, and figured I would need to start with the week of the year.  I have found a few samples here on the boards, but I am not completely clear on how they work, and I am still having issues with the last week of the year.

 

Here is my Week Number Formula:

 

MOD(FLOOR( ( Test_Date__c -DATEVALUE("2006-01-01" ))/7),52)

 

 

Here is my Week in the Quarter Formula:

 

WeekNumber__c - CASE(Current_Quarter__c , 1, 0, 2, 13, 3, 26, 4, 39, 0)

 

 

Here is the Current Quarter Formula I am referencing in my Week of the Quarter Formula:

 

CEILING(MOD(FLOOR( ( Test_Date__c -DATEVALUE("2006-01-01" ))/7),52)/13)

   Eventually I am going to have to compile all of these functions into one big formula, but for now I have them broken out.  Looking forward to this discussion!

 

-Brandy