Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I'm trying to build a dashboard that will enable us to identify which staff are still to attend mandatory training.
I have a table of current active staff and their job roles, a table of mandatory training required for each job role, and finally a table of all currently indate training undertaken by staff.
My aim is to have a dashboard that can be filtered by training course to return a table listing all staff who are required to do this training but have yet to do so.
I've got the relationships set up between the three table which enables me to create a filterable table showing those who in the relevant positions who have completed training. However, I'm at a loss about how to return a table showing those who have not completed the training.
Any advice on how I could create this list would be most appreciated!
Solved! Go to Solution.
Hi,
Thanks for the solution @SamWiseOwl provided, and i want to offer some more information for user to refer to.
hello @GRWAM , you can create the following measure.
Completed =
VAR a =
CALCULATE (
DISTINCTCOUNT ( 'Training History'[StaffID] ),
'Training History'[Course Code]
= SELECTEDVALUE ( 'Required Training'[Skill Code] ),
'Training History'[StaffID] = SELECTEDVALUE ( Incumbents[StaffID] ),
ALL ( 'Training History' )
)
RETURN
IF ( a > 0, "Completed" )
NotCompleted =
VAR a =
VALUES ( Incumbents[Staff Name] )
RETURN
IF (
[Completed] = BLANK ()
&& SELECTEDVALUE ( Incumbents[Staff Name] ) IN a,
"Not Completed"
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solution @SamWiseOwl provided, and i want to offer some more information for user to refer to.
hello @GRWAM , you can create the following measure.
Completed =
VAR a =
CALCULATE (
DISTINCTCOUNT ( 'Training History'[StaffID] ),
'Training History'[Course Code]
= SELECTEDVALUE ( 'Required Training'[Skill Code] ),
'Training History'[StaffID] = SELECTEDVALUE ( Incumbents[StaffID] ),
ALL ( 'Training History' )
)
RETURN
IF ( a > 0, "Completed" )
NotCompleted =
VAR a =
VALUES ( Incumbents[Staff Name] )
RETURN
IF (
[Completed] = BLANK ()
&& SELECTEDVALUE ( Incumbents[Staff Name] ) IN a,
"Not Completed"
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for all your help on this! I've now managed to get this working as required!
Very elegenat, nice job!
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Are you creating a visual or a data table i.e should this be a measure or calculated column?
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Apologies - I should have been clearer in my initial message.
I'm attempting to create a visual. My aim is to have a number of splicers which allow HR to filter staff by unit, job position and course. The end result would be a table visualisation which displays the members of staff who haven't attended the training of the specified course.
Hi @GRWAM
It is hard to do without knowing the relationships or what is in the visual. My Gues would be something like:
Person Requires Training =
Var personId= SelectedValue(persontable[PersonId])
Return
If( Not( personId IN Values(completedtrainingtable[personId])), "Training needed", blank())
This captures the person whose row you are on in the table. Then checks if they are in the completedtraining table which is already being filtered by what your user choose in the slicer.
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Thanks for this. Unfortunately, I can't seem to get PowerBi to accept this without a syntax error (I am adjusting field names etc.)
My data tables look like this:
Incumbents:
Required Training:
Training History:
I have relationships set up between Incumbents (Position Number) > Required Training (Position Number), one to many, and Incumbents (StaffID) > Training History(StaffID), one to many.
Thank you for your advice so far, anything further would be greatly appreciated!
Hi @GRWAM
Test file here: Staff Training.pbix
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Thanks for all your help on this! I've now managed to get this working as required!
Out of curiosity did mine work also?
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hi @GRWAM
You could create a column in the staff table like this:
If( StaffTable[StaffId] IN Values(TraingTable[StaffId]), "Training up to date", "Training required")
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hi @SamWiseOwl,
Unfortunately, I don't think this will work as each member of staff is required to do multiple courses so should appear in the training history table multiple times.
Thanks for your advise though!
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |