Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
EvanBarrick
Creator
Creator

If Expression Using a Date Field and Today

I am attempting to write an If Expression using a Date Field and the Today Function.

I currently have:

=IF(TestDate <= Today(), Sum(Cost), '-'))

However, I can only get the else portion of this IF statement to display. Where am I making a mistake in this expression?

 

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

Suggest to Check format of TestDate field
EvanBarrick
Creator
Creator
Author

I believe there are in the same format, however how would I format them to be the same in the event they weren't

jonathandienst
Partner - Champion III
Partner - Champion III

If TestDate is a field, and there is more than one possible value in the context of this calculation, then TestDate will evaluate to null, so the expression will be false. Perhaps you need:

Sum(If(TestDate <= Today(), ...))

or

Sum({<TestDate = {"<=$(=Today())"}>} ....)
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein