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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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.

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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