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: 
ghassanaldalati
Contributor III
Contributor III

New Customer and Dead Customer between Max Year and previous Years

Hi All... Please help me.

I am create ListBox for New Customer have sales in max selected Years and have no Sales in previous Years from Years selected Rang

if I select Year 2014 - 2015 - 2016 - 2017 and I want to show only the new 2017 customer with sales amount

" =if(sum({$<Year={"$(=max(Year))"}>}Sales)=0 and sum(Sales)>0  then show me the new customers with sales amount "

also I need to create another customer list for dead costumes have sales in previous years and have no sales in max year

please help me how to use IF statement in my expression .

Thank;s and regards

2 Replies
avinashelite

I feel its better to handle it at the script level ...could you please share the sample data set ??

antoniotiman
Master III
Master III

Hi Ghassan,

may be this

=Aggr(Only({<Customer={"=Sum({<Year={'$(=Max(Year))'}>} Sales) > 0 and Count(DISTINCT Year) = 1"}>} Customer),Customer)

Regards,

Antonio