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

Stuck on expression

Hello I have a problem with an expression :-

 

if([Contact Date]-Date<='7',money([Sum Paid]))

Contact Date refers to when the customer contacted me.

There are payments in the past and future of this date.

I am trying to link when the customer called me to pay and the payment clearing on account within a 7 day period. For some reason this is returning a null argh.

Please help.

Paul.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

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.

HIC

View solution in original post

1 Reply
hic
Former Employee
Former Employee

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.

HIC