Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I've spend a healthy amount of time looking for a solution and am posting here as a last hope.
I have a table of offices and a table of employees, and very simply need to find a count of all employees in an office.
I'd like to add the employee count as a calculated column to my Offices table.
I've tried a number of things but nothing has gotten me the results I expect (red font below).
Any suggestions?
Table: Offices
Office_ID | Employee_Count (calculated column) |
NY656 | 3 |
NJ999 | 1 |
CT001 | 1 |
Table: Employees
Employee_ID | Office_ID |
1001 | NY656 |
1002 | NY656 |
1003 | NY656 |
1004 | NJ999 |
1005 | CT001 |
Solved! Go to Solution.
Looks like it works as a measure too. I did have to tell the column to SUM though.
Proud to be a Super User!
A column could have been:
I presume your desired solution is a measure then.
Proud to be a Super User!
Thanks Chris - that is so simple! I'm still a little lost on a measure versus a column, but will take a look.
TY!
Looks like it works as a measure too. I did have to tell the column to SUM though.
Proud to be a Super User!
The rule of Geoff is within 5 minutes of asking a question I figure it out on my own. I believe the answer is:
EmployeeCount =
var _CurrentRowValue = Office[Office_ID]
RETURN
COUNTROWS(
Filter(Employees,
_CurrentRowValue=Employees[Employee_ID]
))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
59 | |
51 |
User | Count |
---|---|
165 | |
83 | |
68 | |
68 | |
59 |