

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to count number of customer buying more then 100K in current year ?
Hi All
How to know how many customer purchase more then 100K ?
Now base on manual click on Table 1 G01 till G04, Ref to Table 2 i get result as below :-
G01-2
G02-3
G03-2
G04-2
So i try to write the expression , if year=2019 sales > 100K count as 1.
count(distinct(company),[Sum(if(Year_n='1',sales))>100,000])
But it does not work , can some one share with me where go wrong ?
I will post my QVW file in my next post.
Paul Yeo
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try switching from IF to set analysis. Something like this:
=count( {< Year_n={1}, company ={"=sum(sales)>100000"}>} distinct company)
(I might not be spot on hence I'm on my mobile device and can't open your attached file)
Qlik Community MVP


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All
Enclosed my QVW file for your ref.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try switching from IF to set analysis. Something like this:
=count( {< Year_n={1}, company ={"=sum(sales)>100000"}>} distinct company)
(I might not be spot on hence I'm on my mobile device and can't open your attached file)
Qlik Community MVP


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much , your expression work fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's great!
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
heyy!!
I'm trying to write an expression for the kpi i wanted but am unable to formulate an expression.
i want to calculate the number of customers current year vs previous year.
Orders last year vs current year
sales last year vs previous year
along with yearly sales.
I'd really appreciate your help.
