Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count number of tests passed/failed by week

To verify a software, I develop tests to check each feature. The verification can take several weeks and all tests are not available at the beginning, time is need to develop it.

The test can be "passed" or "failed" and all tests are not executed every week but they can be executed several times in a week.

My manager wants a status by week to see the progression of the verification.

To do that I would like 2 charts :

- last status by test by week

- count passed/failed by week

My data are :

- id : id of the execution

- wk : week number

- test : name of the test

- status : 0 (failed) or 1 (passed)

At first, I created a straight table with 2 dimensions (week,test) with the following expression :

FirstSortedValue(status,-id)

To count passed, I created a straight table with 1 dimension (week) with the following expression :

sum(aggr(FirstSortedValue(status,-id),test,wk))

Theses charts are wrong because there are missing data :

- the last status of a test for a week is not executed

- all status of each test for missing week

So, I improved the first straight table by replacing the dimension week by ValueLoop to have all week and by improving the expression to have last status at week :

FirstSortedValue(status,-if(ValueLoop(1,8,1)>=wk,id,0))

With this modification, I have the expected good behavior

Now, if I count passed as before :

sum(aggr(FirstSortedValue(status,-if(ValueLoop(1,8,1)>=wk,id,0)),test,ValueLoop(1,8,1)))

The result is bad and I do not understand why.

Can you help me to solve my problem ?

I attached an example

0 Replies