Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two columns that have the Employee IDs.
I want to get these three values:
1. Distinct Employees in Column 1 2. Distinct Employees in Column 2 3. Distinct Employees that appear in both columns |
The first two are straightforward but I'm struggling with the last scenario.
Please help
May be like this
1) Count(DISTINCT [Column 1])
2) Count(DISTINCT [Column 2])
3) Sum(If([Column 1] = [Column 2], 1, 0))
The third doesn't give me a distinct count. It gives me total rows not distinct Employee IDs
See the approach that Stefan has mentioned in robert_mika's link
Hi,
Try like this
SampleData:
LOAD
*
INLINE [
ID1, ID2
1,2
2,5
3,6];
=Count(DISTINCT ID1) + Count({<ID2-=P(ID1)>} DISTINCT ID2)
Hope this helps you
Regards,
Jagan.