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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
kl8818
Frequent Visitor

Count Measurement Help

Hi - need help creating a measurement.

 

Here is a sample of my data:

Item IDCourse TitleUser IDLast NameFirst Name                            Completion StatusCompletion Date
000001Course A12345DoeAllisonComplete4/21/2023
000001Course A23456DoeJohnComplete 4/21/2023
000001Course A34567DoeMarkComplete9/26/2022
000002Course B34567DoeMarkComplete9/26/2022
000002Course B34567DoeMarkComplete9/26/2022
000003Course C34567DoeMarkComplete9/26/2022
000004Course D34567DoeMarkComplete 9/26/2022
000001Course A45678DoeBethComplete9/26/2022
000001Course A56789DoeErikaComplete9/28/2022
000002Course B45678DoeBethComplete 10/3/2022
000003Course C45678DoeBethComplete10/3/2022
000004Course D45678DoeBethComplete 10/3/2022

 

What I would like to do is have a count for each user ID IF they have a completion for EACH course. So only count Mark Doe if he has completed Course A, B, C, and D.

3 REPLIES 3
sjoerdvn
Super User
Super User

try something like this

Count Users Completed All =
VAR coursecount =  DISTINCTCOUNT(Table[Course], ALL())
RETURN COUNTROWS(FILTER(VALUES(Table[User ID]),
	CALCULATE(DISTINCTCOUNT(Table[Course])) = coursecount
)) 
Mahesh0016
Super User
Super User

@kl8818 I hope this helps you.

Count User ID =
CALCULATE(
    COUNT('Table A'[User ID]),
    ALLEXCEPT('Table A','Table A'[Course Title],'Table A'[Completion Status])
)

Mahesh0016_0-1694846916194.png

 

Hi - thank you for your response. It is still not filtering correctly with that formula. It is counting every line not filtering if the user has completed Course A, B, C, D, and E. I have some users who have only completed Course A and B for example and I do not want to count them in this measurement. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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