Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings,
I have a table like this :
Name | Version | Date |
---|---|---|
Jean Time | Basic | 2018-04-09 |
Jean Time | Premium | 2018-04-10 |
Fred Wise | Basic | 2018-01-12 |
Alexander Leviathan | Free | 2018-04-09 |
Alexander Leviathan | Basic | 2018-05-10 |
And i want to have a table who have only one time a name with the most recent date associated like this:
Name | Version | Date | |
---|---|---|---|
Jean Time | Premium | 2018-04-10 | |
Fred Wise | Basic | 2018-01-12 | |
Alexander Leviathan |
| 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 😃
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
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
Thanks that did the trick