Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Find newest information for every week

 

Hi all,

 

I have got a problem I couldn’t solve for weeks, and now I hope somebody of you is able to help me.

 

My datasets contains information about Testcases. Each dataset has got a Case ID, a Timestamp, a result and several other information the user can choose in the application like plan, configuration, cycle and so on.

 

Example

 

Case ID

Timestamp

Result

1234

02.01.2018

failed
5678 04.01.2018 failed
1234 05.02.2018 Blocked
2468 06.02.2018 failed
1234 20.02.2018 passed
5678 01.03.2018 passed
2468

15.03.2018

failed

 

Now I was asked to create a bar chart that shows for every calendar week the number of the latest results for each result. The difficulty is to look back and find for every calendar week the actual result of the highest timestamp for every Testcase.

 

The expression I experimented with is:

count(if(FirstSortedValue(TL_ResultStatusNeu, - Aggr( max(if(TL_TS<=TL_W_TSWeekID,TL_TS)),TL_CaseID,TL_W_TSWeekID))='passed',TL_CaseID))

 

but it doesn’t work.

I hope someone can help me.

 

Best regards

 

Michael

 

3 Replies
sunny_talwar

What is the expected output here?

Digvijay_Singh

May be this -

Capture.PNG

data used as below -

  

Case IDTimestampResult
123404.01.2018Blocked
123403.01.2018failed
567804.01.2018Blocked
123405.02.2018Blocked
246806.02.2018failed
123420.02.2018passed
567801.03.2018passed
567804.03.2018failed
999905.03.2018failed
246815.03.2018

failed

Anonymous
Not applicable
Author

I need the following output:

   

Counted Case IDs
Calendar WeekFailedBlockedPassed FailedBlockedPassed
1-18200 1234;5678
2-18200 1234;5678
3-18200 1234;5678
4-18200 1234;5678
5-18200 1234;5678
6-18210 5678;24681234
7-18210 5678;24681234
8-18201 5678;2468 1234
9-18102 2468 1234;5678
10-18102 2468 1234;5678
11-18102 2468 1234;5678

For every Calendar Week I need the last result set in the past. In the weeks 2 to 5 there are no new results, therefore the old one are still relevant. My problem is to find an expression that "can look" in the past over the limits of the actual Calendar Week. Furthermore I don't know, what the user will select like plan, configuration and so on (I did not mentioned it here to keep it as simple as possible) . So it can be, that not every dataset will be in the selection of the user, so that the result will be different.