June 20, 201114 yr I cannot get a calculation to work. I would like to run a certain report every 4 weeks. So for example if the week number of the current date is 4 or 8 or 12 etc. Needs to be ISO calc to work in the uk so 'WeekOfYearFiscal' How do I do this?
June 20, 201114 yr Week of year is not a good choice - unless you want to restart the count at the beginning of year. Try something like = not Mod ( Div ( Get (CurrentDate) - 1 ; 7 ) ; 4 ) This may need adjustment depending on when you want the cycle to start.
June 20, 201114 yr Author Could you please explain what 'not mod' and 'div' actually do here? ...and I would like it to restart each year.
June 20, 201114 yr Div () returns an (arbitrary) absolute number of week; not Mod ( week ; 4 ) returns 1 (True) for every 4th week, 0 (False) otherwise.. If you want to restart each year, try = not Mod ( WeekOfYearFiscal ( Get (CurrentDate) ; 2 ) ; 4 )
June 25, 201114 yr Author Div () returns an (arbitrary) absolute number of week; not Mod ( week ; 4 ) returns 1 (True) for every 4th week, 0 (False) otherwise.. If you want to restart each year, try = not Mod ( WeekOfYearFiscal ( Get (CurrentDate) ; 2 ) ; 4 ) That's great, just tried this and it works perfectly. Out of interest when I have a calc to name a pdf when running a script to save as pdf I want to display the 4 week period number. I currently have (((WeekOfYearFiscal (DateField))+3) / 4) which displays 5.25 or 9.25 or 13.25 etc ...instead of the 2, 3, and 4 I am looking for. Why is this? what have I done wrong?
June 25, 201114 yr I currently have (((WeekOfYearFiscal (DateField))+3) / 4) which displays 5.25 or 9.25 or 13.25 etc ... No, that's not possible. What you have is not a valid expression and the only thing it can possibly return is an error. I want to display the 4 week period number. Try = Div ( WeekOfYearFiscal ( DateField ; 2 ) - 1 ; 4 ) + 1
Create an account or sign in to comment