The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |