Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4957 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

Could you please explain what 'not mod' and 'div' actually do here?

...and I would like it to restart each year.

Posted

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 )

Posted

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?

Posted

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

This topic is 4957 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.