Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Unique No

Hi,

I have a table as below

   

Emp IDTarget
1112
1213
130
1412
1215
150
1719
1916
111

Solution required:-

1. The Unique count of employee who have delivered sales is 5... i.e it removes the duplicates and does not consider those employees with NIL values

2. Employee wise average is (Emp 11 is 13 + Emp 12 is 28 + Emp 14 is 12 + Emp 17 is 19 + emp 19 is 16) / 5

This has to be in the form of an expression .

Please assist

Regards

1 Solution

Accepted Solutions
Gysbert_Wassenaar

1. count({<Target={"<>0"}>}distinct [Emp ID])

2. sum([Target])/count({<Target={"<>0"}>}distinct [Emp ID])


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
sunny_talwar

May be this:

Avg(Aggr(If(Sum(Target) > 0, Sum(Target)), [Emp ID]))

Gysbert_Wassenaar

1. count({<Target={"<>0"}>}distinct [Emp ID])

2. sum([Target])/count({<Target={"<>0"}>}distinct [Emp ID])


talk is cheap, supply exceeds demand