Forum Discussion

v-bastei's avatar
v-bastei
Icon for Microsoft Employee rankMicrosoft Employee
4 years ago
Solved

Longest test duration per test name per Log_ID

Hi,

I have a table which contains list of tests results.
The main columns are:
- Log_ID  -  iteration name

- Test  -  The test name which could be repeated in the same Log_ID multiple times

- Runtime  -  The test duration

- Type - Test type, I would like to ignore 'build' type

- State - test result, only calculate on PASSED tests

 

I would like to get the longest duration for each test name.

The SQL query is:

SELECT Log_ID, Test, MAX(Runtime) AS Max_Runtime
FROM [TesterChoice-Dev].dbo.HW_Data_Test
WHERE [Type] != 'build' and State = 'PASSED'
GROUP BY Log_ID, Test
ORDER by Log_ID, Test 

Expected results for example:

 



4 Replies

  • v-bastei's avatar
    v-bastei
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi tackytechtom ,

    I have hided some irrelevant columns but here is an example for my data:

    I would like to show the longest test duration for each test per Log_ID, here you can see one test name per log id but it might be few tests that repeated few time with a different Seed which makes it uniqe, also, build test type should not take in account

    I would like to show it as a table just like it shown in the question, inside a PowerBI dashboard, so it probably should be DAX.