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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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