Forum Discussion
MichelleChapman
7 years agoQrew Assistant Captain
That's what it looks like based on the other formula that doesn't have the right start date...not the new ones you are trying to help me understand...
- QuickBaseCoachD7 years agoQrew CaptainThe formula above will not give you are correct answer. My formula will work, but I'm a QSP (Quick Base Solution Provider), so its hard to find the time to walk you though basic Quick Base formulas. That is why you may need to books some time with me or else take some of the QuickBase University courses about formula building.
If I find the time I can post a single formula to provide you with the Week number but I did the formula in a way that allowed for testing various dates so that is why there are three fields. One for the date to test, on for the first Saturday of the year and one for the Week number. - MichelleChapman7 years agoQrew Assistant CaptainI really appreciate your time and assistance. I started at a new company on a trial basis to help with data...not expected to have ever used QuickBase before but to see how quickly I can adapt and create what they need. My apps are pretty in depth so far...I had found a way to build form rules that produced the correct weeks but that would mean manually entering every week of the year into the form rules page...every year. I know that the answer is formulas, in excel this function would be easy but it is much more complicated in QuickBooks. I have watched several videos but I am expected to be able to show visual results weekly as well and I am only in 3 days a week. The other days I am at another job. Once I get the information going I want to do the full QuickBase University course directive and try to achieve certifications, assuming they hire me full time. But I have to get there first.
- QuickBaseCoachD7 years agoQrew CaptainHere is a simplified version using your process date
Create a formula date field called
Ending Saturday of First Week of Year
LastDayOfWeek(FirstDayOfYear(Today()))
Create a field for Week number
var text
var number WeeksSinceFirstWeek =
(ToDays(LastDayOfWeek([Process date])-[Ending Saturday of First Week of Year]))/7;
$WeeksSinceFirstWeek+1 - MichelleChapman7 years agoQrew Assistant Captain
- QuickBaseCoachD7 years agoQrew Captainsorry the last formula should read
Create a field for Week number
var number WeeksSinceFirstWeek =
(ToDays(LastDayOfWeek([Process date])-[Ending Saturday of First Week of Year]))/7;
$WeeksSinceFirstWeek+1 - MichelleChapman7 years agoQrew Assistant CaptainPerfect, it works exactly how it needs to :)
Thank you! It gets so frustrating when you try a million things and can't get the result you need. - QuickBaseCoachD7 years agoQrew CaptainGreat, thx for letting me know.
- MichelleChapman7 years agoQrew Assistant CaptainI am trying to adjust this function so that it will be accurate if information is put in from a previous year or for a future year. The way it was designed-when I enter a process date of 12/10/18 I get Week -2. I want to see week 50 - for Year 2018. So I tried to change Ending Saturday of the First Week of the Year formula to... LastDayOfWeek(FirstDayOfYear([Process Date])) and it seemed to generate the weeks for each year instead of negative weeks but then I noticed 12/30/18 was now showing week 53 instead of week 1 of 2019. Do you have any suggestion how to update either formula to get the right result?
- QuickBaseCoachD7 years agoQrew CaptainCan you post your current formula.
- MichelleChapman7 years agoQrew Assistant CaptainThe current formula is set as you recommended last month for this year...since my modification wasn't quite right.
The formula Ending Saturday of First Week of Year is
LastDayOfWeek(FirstDayOfYear(Today()))
In the Week Field:
var number WeeksSinceFirstWeek =
(ToDays(LastDayOfWeek([Process Date])-[Ending Saturday of First Week of Year]))/7;
$WeeksSinceFirstWeek+1