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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
JoshLeslie_07
Contributor
Contributor

Calculate last 4 months in each row

I just want to Calculate last 4 months in each row in Straight table , this is my first time to use QlikView Please help me

 My Sample Data.

JoshLeslie_07_0-1623981328878.png

here is exactly what I want.

testimage.png

but my output is wrong  screenshot below.

JoshLeslie_07_1-1623981611191.png

 

My Expression that I used so far , it's same result.

Max( aggr( rangesum( below( sum(Sales),0,4) ),Month))

Max(Aggr(RangeSum(Below(Sum({<Month, [MonthYear], MonthYear, Year>}Sales), 0, 4)), [MonthYear]))

Max( aggr( rangesum( below( sum( {$<MonthYear>} Sales),0,4) ),MonthYear))

0 Replies