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: 
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!