Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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

1 Solution

Accepted Solutions
Vegar
MVP
MVP

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)

View solution in original post

5 Replies
paulyeo11
Master
Master
Author

Hi All

Enclosed my QVW file for your ref.

Vegar
MVP
MVP

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)

paulyeo11
Master
Master
Author

Thank you very much , your expression work fine.

Vegar
MVP
MVP

That's great! 

Brownie
Contributor III
Contributor III

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.