Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
What is the best way to calculation the FPY distinct count with Serial Number by Stages
Test1 =FPY%
Test2 =FPY%
Test3 =FPY%
Test4 =FPY%
Sample Data
| Serial Number | Test Stages | Test ID | Test Date | Result |
| 11111111 | Test1-Start | 1 | 03/21/2024 1:00 | Pass |
| 11111111 | Test1-End | 2 | 03/21/2024 1:30 | Pass |
| 22222222 | Test1-Start | 1 | 03/21/2024 1:00 | Failed |
| 22222222 | Test1-Start | 1 | 03/21/2024 1:15 | Pass |
| 22222222 | Test1-End | 2 | 03/21/2024 1:45 | Pass |
| 33333333 | Test2-Start | 3 | 03/21/2024 1:45 | Pass |
| 33333333 | Test2-End | 4 | 03/21/2024 2:00 | Pass |
| 44444444 | Test2-Start | 3 | 03/21/2024 2:00 | Failed |
| 44444444 | Test2-Start | 3 | 03/21/2024 2:10 | Pass |
| 44444444 | Test2-End | 4 | 03/21/2024 2:40 | Pass |
| 55555555 | Test3-Start | 5 | 03/21/2024 2:10 | Pass |
| 55555555 | Test3-End | 6 | 03/21/2024 2:40 | Pass |
| 66666666 | Test4-Start | 7 | 03/21/2024 2:10 | Pass |
| 66666666 | Test4-End | 8 | 03/21/2024 2:50 | Pass |
| 77777777 | Test4-Start | 7 | 03/21/2024 2:50 | Failed |
| 77777777 | Test4-Start | 7 | 03/21/2024 3:10 | Pass |
| 77777777 | Test4-End | 8 | 03/21/2024 3:50 | Pass |
| 11111111 | Test3-Start | 5 | 03/21/2024 3:10 | Failed |
| 11111111 | Test3-Start | 5 | 03/21/2024 3:20 | Pass |
| 11111111 | Test3-End | 6 | 03/21/2024 3:50 | Pass |
Hi @Taman ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
First, Splitting Test Stage based on "-"
Create a measure
FYP% =
VAR _COUNT =
CALCULATE(
COUNT('Table'[Test Stages.1]),
ALLEXCEPT(
'Table',
'Table'[Test Stages.1]
)
)
VAR _startpass =
CALCULATE(
COUNT('Table'[Result]),
FILTER(
'Table',
'Table'[Result] = "Pass" && 'Table'[Test Stages.2] = "Start"
)
)
RETURN
_startpass/_COUNT
Fianl output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
for the FPY culacution it shouldn't count for the SN were failed at 1st time capture in test
Here is the situation:
Total SN count completed the test cycle in Stage w/test-1 : Qty 2
Total SN count completed the test cycle in Stage w/test-1 with 1st time pass : Qty 1
Total Units Requiring Rework: Qty 1
Therefore:
First Pass Yield = (2SN -1 Reworked ) / 100 = 50%
What is FPY ?
FPY = first pass yield
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!