Forum Discussion
Anonymous
5 years agoNot applicable
Match and Count
Hello, I searched for this in the forums, but I think I'm using the wrong terms and it's not a "match and count".
I'd like to take the "Employee ID" data and count how many times it appears in the "Mgr_EmplID" column and return a total to a new column. In the example below "111" shows up twice under MGR_EMPLID, so the new column entry would show a "2". I'm sure this has been answered before on the forums, but I can't find it, can someone point me in the right direction? Thank you!
| EMPLOYEE ID | MGR_EMPLID |
| 111 | 122 |
| 155 | 111 |
| 122 | 104 |
| 124 | 111 |
Hi Anonymous ,
You can use this measure:
CountOfEmployeeId = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'), 'Table'[MGR_EMPLID] = SELECTEDVALUE('Table'[EMPLOYEE ID])))Proud to be a Super User.
If I helped, please accept the solution and give kudos!
Linkedin
3 Replies
- smpa01Community Champion
Anonymous try this
Column = CALCULATE(COUNTX('Table 1','Table 1'[MGR_EMPLID]),ALLEXCEPT('Table 1','Table 1'[MGR_EMPLID]))- AnonymousNot applicable
Perfect, thank you very much!