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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
thuhanoi
New Member

Generate a report to calculate number of items that meet multiple criterias

I have a list of participants who attend the different training in different Quarter like this:

thuhanoi_0-1633501331762.png

 

And I want to have report to show how many participants attends by quarter, how many passed (just passed 1 training session is counted), and how many passed both training session 1 and 2. The report like this:

 

thuhanoi_2-1633501523626.png

Anyone knows how to do it as I got stuck to get number who passed both session 1 and 2, as well as to get the total number with removing duplicate (participants can attend many training session, but when we count, we just count as 1 participant).

 

Thanks!

 

 

1 ACCEPTED SOLUTION
colacan
Resolver II
Resolver II

@thuhanoi  Hi,  you may try below 2 measures.

 

To count (distinct) participant passed the test:

CountPass = CALCULATE(
DISTINCTCOUNT(TestReport[Name]),
TestReport[TestResult] = "Passed"
)
 
To count (distinct) participant passed both Session1 and Session2:
BothPassed =
VAR s1Passed =
SELECTCOLUMNS(
FILTER(
TestReport,
TestReport[Training] = "S1" && TestReport[TestResult] = "Passed"
),
"TestPassed", TestReport[Name]
)
VAR s2Passed =
SELECTCOLUMNS(
FILTER(
TestReport,
TestReport[Training] = "S2" && TestReport[TestResult] = "Passed"
),
"TestPassed", TestReport[Name]
)
VAR bothpassed =
DISTINCT(NATURALINNERJOIN( s1Passed, s2Passed ))
RETURN
COUNTROWS(bothpassed)
 
Thanks.
 
Please mark it as solution if this helped.

View solution in original post

2 REPLIES 2
thuhanoi
New Member

Thanks, it works!

colacan
Resolver II
Resolver II

@thuhanoi  Hi,  you may try below 2 measures.

 

To count (distinct) participant passed the test:

CountPass = CALCULATE(
DISTINCTCOUNT(TestReport[Name]),
TestReport[TestResult] = "Passed"
)
 
To count (distinct) participant passed both Session1 and Session2:
BothPassed =
VAR s1Passed =
SELECTCOLUMNS(
FILTER(
TestReport,
TestReport[Training] = "S1" && TestReport[TestResult] = "Passed"
),
"TestPassed", TestReport[Name]
)
VAR s2Passed =
SELECTCOLUMNS(
FILTER(
TestReport,
TestReport[Training] = "S2" && TestReport[TestResult] = "Passed"
),
"TestPassed", TestReport[Name]
)
VAR bothpassed =
DISTINCT(NATURALINNERJOIN( s1Passed, s2Passed ))
RETURN
COUNTROWS(bothpassed)
 
Thanks.
 
Please mark it as solution if this helped.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.