February 27, 200223 yr 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.
February 28, 200223 yr 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
February 28, 200223 yr 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.
February 28, 200223 yr Author 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
February 28, 200223 yr 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.
February 28, 200223 yr 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.
Create an account or sign in to comment