Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi so I have 2 tables connected to each other through Employee ID. One is HR list of employees and second is Violations.
I have created a slicer by using employee’s name so anyone can query a particular employee and they will get count of violations of an employee.
Each employee belongs to a particular function. I want to create a measure which also tells me the number of employees in the same function who have had any kind of violations.
So for Eg - If I have selected Jamie Franco in the slicer and since he belongs to GL Global function, I should also be able to see how many employees in GL Global function had violations
Hi @gopalm
You need a measure that retains the visible value(s) of Employee Function but otherwise clears filters on Employee, then calculates the number of violations.
I created a dummy pbix here.
Assuming Employee Violations is already defined, the Function Violations measure I created looks like this:
Function Violations = CALCULATE ( [Employee Violations], VALUES ( Employees[Function] ), ALL ( Employees ) )
I would also recommend you remove the Name column from the Violations table as it's not needed.
Regards,
Owen
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |