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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
markhooten
Regular Visitor

Counting # of Completions of training and then displaying

Hello!

I have a data source that includes completions of up to 3 historical training topics by unique user ID.  I need my report to display only those folks who have completed all three.  For the Excel version of the report I used a COUNTIF and then only displayed those UserIDs that had a "3" in the results.  I'm not sure that will work with PowerBI, or what the best way is to achieve the goal.  

The report will show a total percentage of completion using stacked bars to indicate the number of staff who have completed all three of the historical items, or any one of the current items.

Example:

 

Example.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @markhooten 

COUNTIF function in Excel is to count the data in range. I think your code in Excel is like 

 

= COUNTIF(B2:B6,"3")/COUNT(A2:A6)

 

My Sample:

1.png

In Power BI try measures as below.

 

Measure = Divide(calculate(count(Table[ID],Filter(all(Table),Table[Result] =3)),Countax(All(Table),Table[ID])

 

If this reply still couldn't help you solve your problem, please share a sample with me by your Onedrive for Business. And I am confused about Alt1, Alt2, Current,Historical training in your Legend. I need to know more details about your calculate logic. 

 

Best Regards,

Rico Zhou

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @markhooten 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @markhooten 

COUNTIF function in Excel is to count the data in range. I think your code in Excel is like 

 

= COUNTIF(B2:B6,"3")/COUNT(A2:A6)

 

My Sample:

1.png

In Power BI try measures as below.

 

Measure = Divide(calculate(count(Table[ID],Filter(all(Table),Table[Result] =3)),Countax(All(Table),Table[ID])

 

If this reply still couldn't help you solve your problem, please share a sample with me by your Onedrive for Business. And I am confused about Alt1, Alt2, Current,Historical training in your Legend. I need to know more details about your calculate logic. 

 

Best Regards,

Rico Zhou

 

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

parry2k
Super User
Super User

@markhooten it will be easier if you can share sample pbix file with the expected output. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.