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
rayinOz
Helper III
Helper III

Custom column, measure or table

Hello community

 

I have a dataset that has two courses per employee (employeeID). Course A and Course B. Each course will have a status "complete" or "incomplete".

 

EmployeeID | Course Name | Course Status

 

001 | Course A | Incomplete
001 | Course B | Complete

 

002 | Course A | Complete
002 | Course B | Complete

 

003 | Course A | Incomplete
003 | Course B | Incomplete

 

1. I need to get a list of employees who have completed both courses
2. I need to get a percent of employees who have completed both courses

 

I'm sure there is an easy way to do this... any help would be GREATLY appreciated.

 

Kind regards
Ray

 

1 ACCEPTED SOLUTION

Hello

You can download my PBI file from here.

I hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
V-lianl-msft
Community Support
Community Support

Hi @rayinOz ,

 

Please try to create a calculated column and apply in visual level filter.

Y/N = CALCULATE(COUNT('Table'[Course Name]),FILTER(ALLEXCEPT('Table','Table'[EmployeeID]),'Table'[Course Status]="Complete"))
Then create a measure like this:
PERCENTAGE_ = DIVIDE(CALCULATE(DISTINCTCOUNT('Table'[EmployeeID]),FILTER(ALL('Table'),'Table'[Y/N]=2)),CALCULATE(DISTINCTCOUNT('Table'[EmployeeID]),ALL('Table')))
TEST_DISTINCTCOUNT.PNG

For more details,you can refer to the pbix.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

YES... almost there. This solution is gonna work me thinks. 

 

Follow up. IF both courses are listed as incomplete, the field has a null value.. how do I make it a zero?

 

 
Y/N = CALCULATE(COUNT('MI and Cyber (2)'[Course Name]), FILTER(ALLEXCEPT('MI and Cyber (2)','MI and Cyber (2)'[Username]), 'MI and Cyber (2)'[UoM Status]="Completed"))

 

Hello

You can download my PBI file from here.

I hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you! You have given me everything I need!! WHEW!!!! Boss happy now. 😄

 

Kind regards

Ray

 

amitchandak
Super User
Super User

@rayinOz ,

Create the measures like this and display against the employee ID/Name

total = calculate(distinctCOUNT(table[Course Name ]))
Complete =  calculate(distinctCOUNT(table[Course Name ]), table[Course Status]="Complete")

Flag = if([total]=[Complete],"Yes","No")


Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello

 

Thanks for helping me create the three measures. I've done that, but I am unsure how the display them in a list or graph.... thanks so much. 😄

 

Ray

 

luisat
Frequent Visitor

Hey @rayinOz ,

 

at first id suggest to pivot the data so your data would look like this

 

let
Source = #table( {"Column 1", "Column 2", "Column 3"}, { {001 ,"Course A", "Complete"}, {001 ,"Course B", "Complete"}, {002 ,"Course A", "Incomplete"}, {002 ,"Course B", "Complete"}, {003 ,"Course A", "Complete"}, {003 ,"Course B", "Complete"}, {004 ,"Course A", "Incomplete"},
{004 ,"Course B", "Incomplete"} }),
#"Pivot" = Table.Pivot(Source, List.Distinct(Source[#"Column 2"]), "Column 2", "Column 3"),
#"Renamed" = Table.RenameColumns(#"Pivot",{{"Column 1", "Id"}})
in
#"Renamed"

 

grafik.png

 

Now just check where "Course A" and "Course B" is Complete.

grafik.png

CompletedBoth = Abfrage2[Course A] = "Complete" && Abfrage2[Course B] = "Complete"
 
Regards,
Luis
 
 

 

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.