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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mfarina
Frequent Visitor

Training Completion Percentage by Manager

I am trying to create a bar chart visualization that shows the percentage of staff who've completed training grouped by manager.  Two requirements are that a) only active staff should be considered, and b) a staff member taking the same training more than once is counted the same as if they took it just once.  Training Title will be selectable via filter, and I'm assuming I can add a filter to the visualization where User Status is Active, but I'm still missing something.

 

I want the visualization to look like this, using the two tables below it as a highly simplified example of my data (note that user 4093 completed Excel Basics twice and the others on her team all took it once, but that doesn't result in a completion of >100% in the chart).

 

Edit: not all users will appear in the Completions table - in this example they all have a record, but 'Completed?' actually refers to whether another column (not shown here) indicates that they actually attended vs. withdrew from the class, didn't show up, was assigned but hasn't attended yet, etc.  So users who have never had anything to do with a training won't show up in Completions, but they need to be included in the overall percentage still.

 

BarChartCompletion.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'Completions' table

Training TitleUser IDCompleted?
Excel Basics4093TRUE
Advanced Excel4093FALSE
PowerPoint Basics4093TRUE
Advanced PowerPoint4093TRUE
Excel Basics4093TRUE
Excel Basics5185TRUE
Advanced Excel5185TRUE
PowerPoint Basics5185FALSE
Advanced PowerPoint5185FALSE
Excel Basics6660FALSE
Advanced Excel6660FALSE
PowerPoint Basics6660TRUE
Advanced PowerPoint6660FALSE
Excel Basics7981TRUE
Advanced Excel7981TRUE
PowerPoint Basics7981TRUE
Advanced PowerPoint7981TRUE
Excel Basics9890FALSE
Advanced Excel9890FALSE
PowerPoint Basics9890FALSE
Advanced PowerPoint9890FALSE

 

'Users' table

User IDUser Manager IDUser NameUser Manager NameUser Status
409323186Smith, JoeFoo, FredActive
666084436Doe, JohnBar, BethActive
798187582Smith, DaveBar, BethInactive
518566347Smith, AgentFoo, FredActive
989075308Doe, JaneBar, BethActive

 

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@mfarina

 

According to your description, you want to calculated completion for each users group on manager. Right?

 

In your scenario, since you want a staff member taking the same training more than once is counted the same as if they took it just once, you can firstly SUMMAZRIZECOLUMNS() on 'Completion' table to remove the duplicate rows. Then create a measure to calculate percentage for each user. After that we can SUMMARIZE() a new table for populating chart visual. Please see my sample:

 

11.PNG

 

22.PNG

 

1. Remove duplicate rows in 'Completion' table with SUMMARIZECOLUMNS() function. Then create a "Completion Rate" measure:

 

Completion Rate = CALCULATE(COUNTROWS(),ALLEXCEPT(Completion,Completion[User ID]),FILTER(Completion,Completion[Completed?]="True"))
/CALCULATE(COUNTROWS(),ALLEXCEPT(Completion,Completion[User ID]))

2. Create a new calculated table with "InActive" Users filtered.

 

 

User Completion = SUMMARIZE(FILTER(Completion,RELATED(User[User Status])="Active"),Completion[User ID],User[User Name],User[User Manager Name],"completion rate",Completion[Completion Rate])

33.PNG

 

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@mfarina

 

According to your description, you want to calculated completion for each users group on manager. Right?

 

In your scenario, since you want a staff member taking the same training more than once is counted the same as if they took it just once, you can firstly SUMMAZRIZECOLUMNS() on 'Completion' table to remove the duplicate rows. Then create a measure to calculate percentage for each user. After that we can SUMMARIZE() a new table for populating chart visual. Please see my sample:

 

11.PNG

 

22.PNG

 

1. Remove duplicate rows in 'Completion' table with SUMMARIZECOLUMNS() function. Then create a "Completion Rate" measure:

 

Completion Rate = CALCULATE(COUNTROWS(),ALLEXCEPT(Completion,Completion[User ID]),FILTER(Completion,Completion[Completed?]="True"))
/CALCULATE(COUNTROWS(),ALLEXCEPT(Completion,Completion[User ID]))

2. Create a new calculated table with "InActive" Users filtered.

 

 

User Completion = SUMMARIZE(FILTER(Completion,RELATED(User[User Status])="Active"),Completion[User ID],User[User Name],User[User Manager Name],"completion rate",Completion[Completion Rate])

33.PNG

 

 

Regards,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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