Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
BrandonN
Contributor II
Contributor II

Last 4 Months Accumulate value

Hello,

Need help on the accumulate last 4 completed month on expression, tried several ways not working need some help 🙂 
Expected output as below & attached QVF.

BrandonN_0-1666082294678.png

 

 

Labels (6)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

if(YearMonth=max(total YearMonth),0, RangeSum(above(sum({$<YearMonth={"<=$(=Date(Addmonths(max(YearMonth),-1)))>=$(=Date(Addmonths(max(YearMonth),-4)))"}>} Value) ,0,4)) )

?

View solution in original post

2 Replies
justISO
Specialist
Specialist

if(YearMonth=max(total YearMonth),0, RangeSum(above(sum({$<YearMonth={"<=$(=Date(Addmonths(max(YearMonth),-1)))>=$(=Date(Addmonths(max(YearMonth),-4)))"}>} Value) ,0,4)) )

?

BrandonN
Contributor II
Contributor II
Author

Thanks!