Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filter dates

Greetings,

I have a table like this :

NameVersionDate
Jean TimeBasic2018-04-09
Jean TimePremium2018-04-10
Fred WiseBasic2018-01-12
Alexander LeviathanFree2018-04-09
Alexander LeviathanBasic2018-05-10

And i want to have a table who have only one time a name with the most recent date associated like this:

NameVersionDate
Jean TimePremium2018-04-10
Fred WiseBasic2018-01-12
Alexander Leviathan
Basic
2018-05-10

I'm looking for a Qlik way to do it but I'm taking the data for my first table from an impala database so if you know a select that allow me to do that right away i take it too 😃

1 Solution

Accepted Solutions
sibin_jacob
Creator III
Creator III

Please create flag for last date for each name using the below script.

//Fact_table is the existing table

Table2:

Load Name,Version,Date

if(Name=previous(Name),0,1) as Last_Date_flag

Resident Fact_table order by Date,Name desc;

Use Last_Date_flag column for filtering your data,


Table3:

Noconcatenate

Load Name,Version,Date

Resident Table2

Where Last_Date_flag=1;


We can filter the Latest date value using set expression also in the chart.

Please refer this link if required

Warehouse analysis - period to period


Thanks,

Sibin

View solution in original post

2 Replies
sibin_jacob
Creator III
Creator III

Please create flag for last date for each name using the below script.

//Fact_table is the existing table

Table2:

Load Name,Version,Date

if(Name=previous(Name),0,1) as Last_Date_flag

Resident Fact_table order by Date,Name desc;

Use Last_Date_flag column for filtering your data,


Table3:

Noconcatenate

Load Name,Version,Date

Resident Table2

Where Last_Date_flag=1;


We can filter the Latest date value using set expression also in the chart.

Please refer this link if required

Warehouse analysis - period to period


Thanks,

Sibin

Anonymous
Not applicable
Author

Thanks that did the trick