If this function is used somewhere in the UI, you need to have an aggregation function. Otherwise QlikView will most likely return NULL. See more on http://community.qlik.com/blogs/qlikviewdesignblog/2012/08/03/the-only-function
You probably want
Sum( if([Contact Date]-Date<='7',[Sum Paid]) )
will evaluate the date comparison for every record in the raw data, then sum over the records where the condition is true.