Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What to do when "X" field is blank

I'm trying to write an expression that says when the Bill Date is blank, calculate the difference in the sums of the Total Request Amount and Reimbursement Amount. Unfortunately, what I'm using below isn't working. Any ideas? Thanks in advance.

=money(sum(if(Len(trim([Bill Date]))>0, [Total Request Amount]-[Reimbursement Amount])))

11 Replies
Not applicable
Author

Hmm…the calculation below is ignoring the bill date column altogether and just calculating sum (total request amount) – sum (reimbursement amount)

jduenyas
Specialist
Specialist

I appologize.

You want to sum only if date EXISTS. Is that true? (your original post states this : if(Len(trim([Bill Date]))>0)

If so then use this

if(NOT isnull([Bill Date]) AND len(Trim([Bill Date])) <> 0, sum([Total Request Amount]-if(not isnull([Reimbursement Amount]),[Reimbursement Amount],0)))