Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Expression Problem

Hello,

starting point is a table with multiple columns, where two columns are relevant to my problem. This is an item ID and a date. I want to get displayed in my table only the items which have the smallest date per item. If there are the same dates for a item then show a random datarow or the row with the smallest PrimaryKey(PK).

Anyone a solution for that?

For example:

Rawdata:

Item ID, Date, PK, colx, coly

1, 12.12.2012, 1, xxx, yyy

1, 12.12.2012, 2, xx2, yy2

1, 18.12.2012, 3, xyz, yxz

2, 02.01.2013, 4, aaa, bbb

3, 08.01.2013, 5, ccc, ddd

3, 09.01.2013, 6, abc, ddd

4, 04.04.2013, 7, ddd, ttt

ResultTable:

Item ID, Date, PK, colx, coly

1, 12.12.2012, 1, xxx, yyy (or 12.12.2012, 2, xx2, yy2)

2, 02.01.2013, 4, aaa, bbb

3, 08.01.2013, 5, ccc, ddd

4, 04.04.2013, 7, ddd, ttt

Thank You!

1 Solution

Accepted Solutions
5 Replies
Clever_Anjos
Employee
Employee

Use straighttable

1) Use ID as dimension

2) As expressions use

    a) Min(Date)

    b) FirstSortedValue(PK,Date+PK/1000)

    c) FirstSortedValue(colx,Date+PK/1000)

    d) FirstSortedValue(coly,Date+PK/1000) 

Not applicable
Author

Doesnt work..

Im only getting dimension values in one row, the others are null.

tresesco
MVP
MVP

PFA

Not applicable
Author

Thank you!

Clever_Anjos
Employee
Employee

Weird,

it worked here, step by step

Capturar.PNG.png