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
BParent
New Member

Calculating Percentage of Completed Courses

Hey all,

 

I'm at a bit of a loss on how to tackle the following problem.

 

I have a dataset that is basically

 

NameCourse

Bryan

1.A

Bryan

1.B
Bryan1.C
David1.A

 

I'd like to add a third column there that says what percent complete Bryan and David are at through the course of study (Complete being defined as all three courses, 1.A, 1.B, 1.C).

 

So it would eventually look like this:

NameCourseCompletion % of All Courses
Bryan1.A100%
Bryan1.B100%
Bryan1.C100%
David1.A33%

 

I might just be tired, but I did try searching around and didn't find this scenerio. 

 

Appreciate any help.

1 ACCEPTED SOLUTION
v-lgarikapat
Community Support
Community Support

Hi  @BParent ,

Thank you for reaching out to the Microsoft Fabric Community Forum.

 @SundarRaj  @Omid_Motamedise  I appreciate your prompt responses and for sharing the Power Query-based solutions.

 @BParent In addition to that, this scenario can also be achieved using DAX. I’ve uploaded a sample PBIX file for your reference. Please feel free to review it at your convenience, and I’d be grateful for any feedback you may have.

 

vlgarikapat_0-1752212491245.png

If this post helped resolve your issue, please consider the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.

We appreciate your engagement and thank you for being an active part of the community.

Best regards,
LakshmiNarayana
.

 

View solution in original post

4 REPLIES 4
v-lgarikapat
Community Support
Community Support

Hi  @BParent ,

Thank you for reaching out to the Microsoft Fabric Community Forum.

 @SundarRaj  @Omid_Motamedise  I appreciate your prompt responses and for sharing the Power Query-based solutions.

 @BParent In addition to that, this scenario can also be achieved using DAX. I’ve uploaded a sample PBIX file for your reference. Please feel free to review it at your convenience, and I’d be grateful for any feedback you may have.

 

vlgarikapat_0-1752212491245.png

If this post helped resolve your issue, please consider the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.

We appreciate your engagement and thank you for being an active part of the community.

Best regards,
LakshmiNarayana
.

 

Hi @BParent ,

I wanted to follow up and confirm whether you’ve had the opportunity to review the information we provided. Should you have any questions or require further clarification, please don't hesitate to reach out.

 

Best Regards,

Lakshmi Naraayna

SundarRaj
Super User
Super User

Hi @BParent , another PQ solution. Thanks!

SundarRaj_0-1752208273545.png

Here's the code:
let
Source = #table(
{"Name", "Course"},
{
{"Bryan", "1.A"},
{"Bryan", "1.B"},
{"Bryan", "1.C"},
{"David", "1.A"}
}
),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Course", type text}}),
CoursesAv = List.Count ( List.Distinct ( #"Changed Type" [Course] ) ),
Group = Table.Group( #"Changed Type", { "Name" }, { { "Course" , each _[Course] } , { "Course Completion" , each Table.RowCount( _ ) , Int64.Type } } ),
Percentage = Table.TransformColumns ( Group , { "Course Completion" , each _ / CoursesAv , Percentage.Type } ),
Expand = Table.ExpandListColumn(Percentage, "Course")
in
Expand


Sundar Rajagopalan
Omid_Motamedise
Super User
Super User

Copy and paste the following code into the advanced editor.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciqqTMxT0lEy1HFUitVB5juh8vWcwXyXxLLMFDAfqD4WAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Course = _t]),
    #"Added Custom" = Table.AddColumn(Source, "% of complete", each Table.RowCount(Table.SelectRows(Source,(x)=> x[Name]=_[Name]))/3)
in
    #"Added Custom"

 

 

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors