Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Count with dynamic filter

Hello,

 

I need some help on a formula dax.

 

I have an Employee table with an ID

I have a Training table with the year of training and the employee ID

 

I would like to have the number of employees who have completed the training for one year. that's Ok, I count ID from the training table.

 

I would also like to have the number of employees who haven't completed training according to the year that the user will have chosen in a filter on the year of the training table.

 

Can you help me please ?

Thanks

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Presuming that the slicer will filter the Training table, you could use

Not done training =
VAR allEmployees =
    ALL ( 'Employees'[ID] )
VAR doneTraining =
    VALUES ( 'Training'[Employee ID] )
RETURN
    COUNTROWS ( EXCEPT ( allEmployees, doneTraining ) )

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Presuming that the slicer will filter the Training table, you could use

Not done training =
VAR allEmployees =
    ALL ( 'Employees'[ID] )
VAR doneTraining =
    VALUES ( 'Training'[Employee ID] )
RETURN
    COUNTROWS ( EXCEPT ( allEmployees, doneTraining ) )

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.