Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
In my following Qliks ense table, I want to display only the green lines (latest date for each Ref)
Would you please support ?
Hi @Bilal3
First you need to flag each of the latest rows. To do this create a unique key of Ref and Date in the load of the table:
Table:
LOAD
Ref & Date(Date, 'YYYYMMDD') as RowID,
Ref,
Date,
...
Then once you have the key you can pull out just the latest RowID per Ref in a separate table:
Latest:
LOAD
maxstring(RowID) as RowID,
1 as IsLatest
RESIDENT Table
GROUP BY Ref;
You can then use the IsLatest field in set analysis in the measures in your table, e.g.
sum({<IsLatest*={1}>}Value)
I notice one of your dates is malformed in your screenshot, the above will only work if you have correct dates in your data.
Hope that helps.
Steve
Hi, from the back end you could do this.
Data:
LOAD Ref,
Date,
In,
Out,
Name
FROM SourceTable;
Inner Join
LOAD Ref,
Date(Max(Date)) as Date
Resident Data;