Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Stuck on expression

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

1 Reply

Re: Stuck on expression

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