I was thinking along the same lines as @Melissa. If you unpivot your data and create a simple 1/0 dummy variable in Power Query, your DAX reduces down to two short measures:
Tests Passed =
CALCULATE(
SUM( 'Test Data Unpivoted'[Test Result Num] ),
ALLEXCEPT(
'Test Data',
'Test Data'[Trial Number]
),
TREATAS(
VALUES( 'Test Data'[Trial Number]),
'Test Data Unpivoted'[Trial Number]
)
)
Pass Fail =
VAR TotalTests = 4
RETURN
IF( [Tests Passed] = TotalTests,
"Pass",
"Fail"
)
And this DAX will work for 4 tests or 4,000 tests, with the only change being to set the TotalTests variable to the proper number.
I hope this is helpful. Full solution file attached below.
- Brian
eDNA Forum - Pass Fail solution.pbix (50.6 KB)