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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajiv10976
Contributor
Contributor

Max Amount lf Last 30 Days while loading data

I need to calculate Max Sale of last 30 days while loading data.

MyData:
LOAD id,num(InvoiceDate) as %date,Amount INLINE [
id,InvoiceDate,Amount
1,2019-03-09,78
2,2019-03-10,32
3,2019-03-12,30
4,2019-03-18,57
5,2019-03-06,59
6,2019-03-04,74
7,2019-03-02,30
8,2019-03-13,53
9,2019-03-03,65
10,2019-03-03,60
11,2019-02-13,53
12,2019-02-03,65
13,2019-02-03,60
];


can anyone please help
1 Reply
Taoufiq_Zarra

@Rajiv10976 ,

maye be like ?

MyData:
LOAD id,num(InvoiceDate) as %date,Amount INLINE [
id,InvoiceDate,Amount
1,2019-03-09,78
2,2019-03-10,32
3,2019-03-12,30
4,2019-03-18,57
5,2019-03-06,59
6,2019-03-04,74
7,2019-03-02,30
8,2019-03-13,53
9,2019-03-03,65
10,2019-03-03,60
11,2019-02-13,53
12,2019-02-03,65
13,2019-02-03,60
14,2022-02-03,60
15,2022-01-20,70
];

left join load Max(Amount) as MaxAmount30date resident MyData where %date>num(Date(today()-30))

 

output:

Taoufiq_Zarra_0-1644843504065.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉