Forum Discussion
Anonymous
6 years agoNot applicable
Tracking test performance
Hello, I've been wracking my brain around how to best solve this question but haven't came up with something acceptable. I have 38000 rows of data that documents each time a test is performed an...
- 6 years ago
Hi Anonymous
as assumed, there may be two cases:
one:
Measure = VAR mindate = CALCULATE ( MIN ( 'Table'[Timestamp] ), ALLEXCEPT ( 'Table', 'Table'[Test Subject], 'Table'[Test Case] ) ) RETURN CALCULATE ( MAX ( 'Table'[Status] ), FILTER ( 'Table', 'Table'[Timestamp] = mindate ) ) Measure 2 = VAR mincase = CALCULATE ( MIN ( 'Table'[Test Case] ), ALLEXCEPT ( 'Table', 'Table'[Test Subject] ) ) RETURN CALCULATE ( [Measure], FILTER ( 'Table', 'Table'[Test Case] = mincase ) ) pass a test the first time = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 2]="Passed")) needed to be retested = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure]="Failed"))another:
Measure 3 = IF ( FIND ( "Failed", CONCATENATEX ( ALLEXCEPT ( 'Table', 'Table'[Test Subject] ), [Measure], "," ), 1, 0 ) >= 1, "Failed", "Passed" ) pass a test the first time2 = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 3]="Passed")) needed to be retested 2 = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 3]="Failed"))Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
6 years agoCommunity Support
Hi Anonymous
as assumed, there may be two cases:
one:
Measure =
VAR mindate =
CALCULATE (
MIN ( 'Table'[Timestamp] ),
ALLEXCEPT (
'Table',
'Table'[Test Subject],
'Table'[Test Case]
)
)
RETURN
CALCULATE (
MAX ( 'Table'[Status] ),
FILTER (
'Table',
'Table'[Timestamp] = mindate
)
)
Measure 2 =
VAR mincase =
CALCULATE (
MIN ( 'Table'[Test Case] ),
ALLEXCEPT (
'Table',
'Table'[Test Subject]
)
)
RETURN
CALCULATE (
[Measure],
FILTER (
'Table',
'Table'[Test Case] = mincase
)
)
pass a test the first time = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 2]="Passed"))
needed to be retested = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure]="Failed"))
another:
Measure 3 =
IF (
FIND (
"Failed",
CONCATENATEX (
ALLEXCEPT (
'Table',
'Table'[Test Subject]
),
[Measure],
","
),
1,
0
) >= 1,
"Failed",
"Passed"
)
pass a test the first time2 = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 3]="Passed"))
needed to be retested 2 = CALCULATE(DISTINCTCOUNT('Table'[Test Subject]),FILTER('Table','Table'[Measure 3]="Failed"))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
This is exactly what I'm looking for. Thank you very much for your help, v-juanli-msft. You just made my life a whole lot easier!