Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

reduce data with latest dates

Data:

DateCityRates
02/Jan/2016Calgary12;34;55;67
16/Aug/2016Calgary33;78;94;23
1/Dec/2015Surrey98;23;55;11;23;55;66
23/May/2015Calgary66;45;22;134
2/Feb/2015Surrey09;33;56;74;83
03/May/2018Niagara Falls334;22;6;343;5
17/July/2014
Niagara Falls

55;32;55;77

How can I restrict data during script execution (not in table) to only load rows which matches latest dates for each City and show corresponding Rates.

Results

DateCityRates
16/Aug/2016Calgary33;78;94;23
1/Dec/2015Surrey98;23;55;11;23;55;66
03/May/2018Niagara Falls334;22;6;343;5
1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

This would help you:

Table1:

LOAD

     City,

     Rates,

     Date

FROM

[..\Desktop\LatestDates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Filter:

INNER KEEP (Table1)

LOAD City,

     Date(Max(Date), 'DD-MMM-YYYY') AS Date

   

Resident Table1

Group by City;

DROP TABLE Filter;

View solution in original post

1 Reply
vishsaggi
Champion III
Champion III

This would help you:

Table1:

LOAD

     City,

     Rates,

     Date

FROM

[..\Desktop\LatestDates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Filter:

INNER KEEP (Table1)

LOAD City,

     Date(Max(Date), 'DD-MMM-YYYY') AS Date

   

Resident Table1

Group by City;

DROP TABLE Filter;