The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have two tables, the first contains all the company's employees and their respective data, the second has only two columns, the first is the record number and the second contains the training carried out by the employee, so the number of records is repeated in the first column if the employee has done more than one training. I need to compare the two and show the employees who have not done any training. Question: How do I compare the registration columns of the two tables and show employees who have not undergone a specific training?
Solved! Go to Solution.
Try:
first the model:
Then the following measures:
Names =
VAR EMP =
CALCULATE (
MAX ( 'Employee Table'[Name] ),
TREATAS (
VALUES ( 'Employee Table'[Employee ID] ),
'Training Table'[Employee ID]
)
)
RETURN
EMP
and
Pending Training =
VAR employee =
VALUES ( 'Employee Table'[Employee ID] )
VAR training =
VALUES ( 'Training Table'[Employee ID] )
RETURN
COUNTROWS ( EXCEPT ( employee, training ) )
Add the Employee ID form the employee table, the [Names] measure and the 'Training Table' [Training] column to the table visual. Add the [Pending Training] measure to the filters on the visual in the filter pane and you get this:
Proud to be a Super User!
Paul on Linkedin.
Try:
first the model:
Then the following measures:
Names =
VAR EMP =
CALCULATE (
MAX ( 'Employee Table'[Name] ),
TREATAS (
VALUES ( 'Employee Table'[Employee ID] ),
'Training Table'[Employee ID]
)
)
RETURN
EMP
and
Pending Training =
VAR employee =
VALUES ( 'Employee Table'[Employee ID] )
VAR training =
VALUES ( 'Training Table'[Employee ID] )
RETURN
COUNTROWS ( EXCEPT ( employee, training ) )
Add the Employee ID form the employee table, the [Names] measure and the 'Training Table' [Training] column to the table visual. Add the [Pending Training] measure to the filters on the visual in the filter pane and you get this:
Proud to be a Super User!
Paul on Linkedin.
Perfect !!! Thank you !!
Can you provide a sample (fake) dataset tonwork with please? And a depiction of how the model is set p
Proud to be a Super User!
Paul on Linkedin.
Hello, PaulDBlown. Thanks for the feedback.
Basically I have two tables, the first contains data for all employees of the company and the second contains two columns, the ID and the training carried out by him. However, in the second table, the ID data is repeated according to the number of training sessions performed by the employee, becoming more or less as the table below.
Table 01
Basically, i want to compare the ID the table 01 with th table 02 and show the employees that didn't do especific training.
Can you help me ?