Jump to content

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

Recommended Posts

Posted

In my 'days past due field' I have the calculation:

today's date - billing date - 30

The calculation (sum) can be a positive or negative number (and it works well).

However, I want the number appearing in the 'days past due' field to be greater than zero only. If it's zero or a negative number, I want the field to be blank. How do I do this? thanks.

Posted

Try using an If or Case statement for the calc field:

If (Today-BillingD-30)>0, Today-BillingD-30, "0") or

Case(

Today-BillingD-30)>0, Today-BillingD-30,

Today-BillingD-30)less than or equal to 0, "0")

Hope this helps, greg

Posted

My error, I wasn't wearing my reading glasses. If you want the field to blank ranther than zero, as I first thought, for negative numbers the case or if statement for that eventuality should be:

Case

T-BD-30 greater than or equal to 0,T-BD-30

T-BD-30 < 0, "" or

If T-BD-30 greater than or equal to 0,T-BD-30, "".

The "" is a pair of parenthases without a space in between.

sorry for the confusion, greg.

Posted

Thanks Greg -- the zero is OK -- here's what seems to work:

If(today's date-billing date-30>0, (today's date-billing date-30), "0" or

Case(today's date-billing date-30>0, (today's date-billing date-30) >=0, "0"))

I don't understand the syntax (rationale) of the open/close parens -- but I'm not going to worry about it.

thanks again,

Harry

Posted

The empty pair of parentheses ensures the field will be blank for negative numbers, as I originally wrote the test for zero and positive numbers. If the test is for positive numbers and the alternative is zero, the empty pair of parentheses is not necessary. Also unnecessary in case statements but, it's late, and my brain is shutting down. Have a good day, correction, night. greg.

Posted

The empty pair of parentheses ensures the field will be blank for negative numbers, as I originally wrote the test for zero and positive numbers. If the test is for positive numbers and the alternative is zero, the empty pair of parentheses is not necessary. Also unnecessary in case statements but, it's late, and my brain is shutting down. Have a good day, correction, night. greg.

This topic is 8375 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.