Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Sum if count distinct result greater than value

Hi All,

 

I am quite new in qlik view, and I got below expression to calculate Worker performance.

My dimension is Worker 

(sum(if([Process Code]='107', [Manufactured Qty])))
/
(sum(if(Deleted='No',[Planning Qty])))

I want to run this function for who worked more than 50 work orders. (count(distinct(WO))>50

Regards,

Dogan

 

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Sum if count distinct result greater than value

Hi , 

try in this way:

 

if (count(distinct(WO))>50, sum(if([Process Code]='107', [Manufactured Qty])) sum(if(Deleted='No',[Planning Qty])))

 

but you will have better performance if you use the set analysis:

if (count(distinct(WO))>50, sum({<[Process Code]= {'107'}>} [Manufactured Qty]) / sum({<Deleted={'No'}>}[Planning Qty]))

 

Ciao

Ale

 

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Sum if count distinct result greater than value

Hi , 

try in this way:

 

if (count(distinct(WO))>50, sum(if([Process Code]='107', [Manufactured Qty])) sum(if(Deleted='No',[Planning Qty])))

 

but you will have better performance if you use the set analysis:

if (count(distinct(WO))>50, sum({<[Process Code]= {'107'}>} [Manufactured Qty]) / sum({<Deleted={'No'}>}[Planning Qty]))

 

Ciao

Ale

 

View solution in original post

Highlighted
Contributor
Contributor

Re: Sum if count distinct result greater than value

Set analysis worked, thanks for your help.

Regards,
Dogan