Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
@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: