Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

3 Replies
swuehl
MVP
MVP

sunny_talwar

Try not to create duplicate threads... check here

New Customer and Dead Customer between Max Year and previous Years

antoniotiman
Master III
Master III

May be this

='New Customer :'&Chr(10)&
Concat({<CustName={"=Sum({<Year={'<=$(=Min(Year))'}>} Sales) = 0"}>}  DISTINCT CustName,'-')
&Chr(10)&
'Dead Customer :'&Chr(10)&
Concat({<CustName={"=Sum({<Year={'$(=Max(Year))'}>} Sales) = 0"}>}
DISTINCT CustName
,'-')