Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

New Customers Competition - chart

Hi all!

I'm quite new with QV, and I'm having a problem with my expression, where I should have only customers who are new or haven't bought anything in last 18 months before the competition (and who have bought over 300€). Competition started 01.08.2013.

I am doing something wrong with that past 18 months..

This is the expression I have used:

if(sum({$<Invoicedate={">='01.02.2012'"},Invoicedate={"<'31.07.2013'"}>}Invoiced)=0 and (sum(Invoiced)>= '300'),sum(Invoiced),0)

but it still gets all the customers. Could somebody help me with my expression, please?

-Kirsi-

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you using a chart with Customer as dimension?

Then this chart expression might work, but you should use Invoicedate as field in your set modifier only once:

=if(sum({$<Invoicedate={">=01.02.2012<31.07.2013"}>} Invoiced)=0 and (sum(Invoiced)>= 300),sum(Invoiced),0)


or if you need to check for Invoiced > 300 after Aug 1st:


=if(sum({$<Invoicedate={">=01.02.2012<31.07.2013"}>} Invoiced)=0 and (sum({$<Invoicedate={">31.07.2013"}>}
Invoiced)>= 300),sum(Invoiced),0)


To only show the customers that fulfill this condition, this should be your only expression and 'Suppress zero values' should be checked on presentation tab.

View solution in original post

2 Replies
swuehl
MVP
MVP

Are you using a chart with Customer as dimension?

Then this chart expression might work, but you should use Invoicedate as field in your set modifier only once:

=if(sum({$<Invoicedate={">=01.02.2012<31.07.2013"}>} Invoiced)=0 and (sum(Invoiced)>= 300),sum(Invoiced),0)


or if you need to check for Invoiced > 300 after Aug 1st:


=if(sum({$<Invoicedate={">=01.02.2012<31.07.2013"}>} Invoiced)=0 and (sum({$<Invoicedate={">31.07.2013"}>}
Invoiced)>= 300),sum(Invoiced),0)


To only show the customers that fulfill this condition, this should be your only expression and 'Suppress zero values' should be checked on presentation tab.

Not applicable
Author

Thank you!

Works perfectly now!

-Kirsi-