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
Anonymous
Not applicable

Calculated Measure Multiple Criteria?

Hello Community,

 

In the table below, I'd like to count the user only if all of their required courses have been completed. The user is assigned to an allotment of courses, but I only want to count the user as "completed" if they have completed all of their required courses. This is just a small cut of the data, so when you consider all of the data, each user is responsible for completing all of their required courses. Upon completion of those required courses, the planned user completion should show 1 for the individual user and the actual user completion should also show 1. However, if the user shows "in progress" or "not attempted" for any of the required courses, the actual user completion card should show 0. 

 

I am using a calculated measure (as shown below), to display the actual count in a card, but I can't figure out the logic to not count the user as completed if they have a status of "in progress" or "not attempted" for a required course. Can you all help?image.pngimage.pngimage.png 

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

=COUNTROWS(FILTER(SUMMARISE(VALUES(LearningPlanDetails{UserName]),[UserName],"ABCD",CALCULATE(COUNTROWS(LearningPlanDetails),LearningPlanDetails[Course Completino Status]="Completed")),[ABCD]=COUNTROWS(LearningPlanDetails)))

 

Hope this helps.


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

@Ashish_Mathur & @v-jiascu-msft - Thank you for your assistance!

 

Ashish, I tried your solution but did not get it to work.

 

Dale, I appreciate your reply but it came off a bit too cryptic for me so I didn't understand it.

 

That said, I was able to figure out how to get my desired result and it works too good lol. I adjusted the calculated measure the now subtract the incomplete and in progress statuses from the completed statuses in order to get a count of the usernames who only have completed all of their required courses. My issue now is that if there is more than one class that is incomplete or in progress, the count goes below 0 to either -1 or -2. My fear is that these negative numbers are affecting the overall sum of users who have actually completed their training. Is it possible to have the number display as 0 instead of a negative number?

Updated Calculated Measure LogicUpdated Calculated Measure Logicimage.pngimage.png

Hi @Anonymous,

 

Share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

1. The formula evaluates completions while the [Course Completion Status] is "In Progress". It should be "Completed".

Actual User Completions =
CALCULATE (
    DISTINCTCOUNT ( LearningPlanDetails[Username] ),
    LearningPlanDetails[Course Type] = "Online Course",
    LearningPlanDetails[Optional/Required] = "Required",
    LearningPlanDetails[Course Completion Status] = "In Progress"
)

2. I guess we only can say one course of one user is completed. So we need to specify the course name in the formula or in a slicer. 

 

Best Regards!

Dale

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

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.