Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have three columns in my table - EmpID, Supervisor and Level. I need to find out count of number of direct reports for a particular EmpID using the Supervisor column but only for the Leader, Manager and Director levels. The count of number of direct reports should be populated in a new column (CountofDirectReports). I highlighted CountofDirectReports column in yellow where the count needs to go. I working to figure it out using DAX but could not figure it out. Can someone please help?
Here is the sample data as an example:
Thanks for your help!
Solved! Go to Solution.
Hello @Anonymous
You can use a measure like so to add a calculated column to your table:
DirectReports = VAR CurrentEmp = 'Table'[EmpID] RETURN CALCULATE( COUNTROWS('Table'), ALL('Table'), 'Table'[Supervisor] = CurrentEmp )
Hello @Anonymous
You can use a measure like so to add a calculated column to your table:
DirectReports = VAR CurrentEmp = 'Table'[EmpID] RETURN CALCULATE( COUNTROWS('Table'), ALL('Table'), 'Table'[Supervisor] = CurrentEmp )
This worked. Thank you for your help!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |