Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlaf_93
Creator II
Creator II

price analysis

Good morning,

i've got a table like this:

 

[price]:

load

YEAR,

PRICE,

ARTICLE

FROM ......;

 

I would like to load for every article the last price available.

How could i do it? With a max(year) function?

 

Thanks

4 Replies
avinashelite
MVP
MVP

Try this 

[price]:

load

YEAR,

PRICE,

ARTICLE

FROM ......;

Final:

LOAD Max(YEAR) as YEAR,

PRICE,
ARTICLE
FROM ......;

Resident

price

Group by 

PRICE,
ARTICLE

;

 

Drop table price;

 

Carlaf_93
Creator II
Creator II
Author

i loaded those data but they don't work

 

[PR]:
LOAD * INLINE [
YEAR, PRICE, ART,
2020,10,DRT,
2021,20,DRT,
2020,30,VRT];
[PR2]:
LOAD
MAX(YEAR) AS YEAR,
PRICE,
ART
RESIDENT [PR] GROUP BY PRICE,ART;
DROP TABLE PR;

avinashelite
MVP
MVP

Could you please mention what is not working 

Carlaf_93
Creator II
Creator II
Author

 

Carlaf_93_0-1625572664609.png