Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table as below
Emp ID | Target |
11 | 12 |
12 | 13 |
13 | 0 |
14 | 12 |
12 | 15 |
15 | 0 |
17 | 19 |
19 | 16 |
11 | 1 |
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. count({<Target={"<>0"}>}distinct [Emp ID])
2. sum([Target])/count({<Target={"<>0"}>}distinct [Emp ID])
May be this:
Avg(Aggr(If(Sum(Target) > 0, Sum(Target)), [Emp ID]))
1. count({<Target={"<>0"}>}distinct [Emp ID])
2. sum([Target])/count({<Target={"<>0"}>}distinct [Emp ID])